Fix PR16360
authorMichael Liao <michael.liao@intel.com>
Fri, 21 Jun 2013 18:45:27 +0000 (18:45 +0000)
committerMichael Liao <michael.liao@intel.com>
Fri, 21 Jun 2013 18:45:27 +0000 (18:45 +0000)
commit2da863984bdd0123fa53ab3f5439d239a5a9e419
treec08d34b73b0f773b443622305abc4e274f1f667e
parentc12c880998a0be9de2d20f7855029ef743570a06
Fix PR16360

When (srl (anyextend x), c) is folded into (anyextend (srl x, c)), the
high bits are not cleared. Add 'and' to clear off them.

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