When transforming sext(trunc(load(x))) into sext(smaller load(x)),
authorDan Gohman <gohman@apple.com>
Mon, 27 Apr 2009 02:00:55 +0000 (02:00 +0000)
committerDan Gohman <gohman@apple.com>
Mon, 27 Apr 2009 02:00:55 +0000 (02:00 +0000)
commitc7b3444095f9aa5398d134c780e327a187cda231
tree4a1567e3145693dd2b1e2b880daf266b8f7b4231
parentd6c329532bed7a60f760b3a009b3582c624bc270
When transforming sext(trunc(load(x))) into sext(smaller load(x)),
the trunc is directly replaced with the smaller load, so don't
try to create a new sext node. This fixes PR4050.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70179 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
test/CodeGen/X86/fold-sext-trunc.ll [new file with mode: 0644]