PR14562 - Truncation of left shift became undef
authorPaul Redmond <paul.redmond@intel.com>
Tue, 12 Feb 2013 15:21:21 +0000 (15:21 +0000)
committerPaul Redmond <paul.redmond@intel.com>
Tue, 12 Feb 2013 15:21:21 +0000 (15:21 +0000)
commit288604ed0c2dd9a66093c525c7525bb2e7ed91fc
tree00a8d2f029740f3cecb7876bd11b5af5bcc52700
parent71a4ab7141d7b201f0039f6d1f1ce7b8dd3b0430
PR14562 - Truncation of left shift became undef

DAGCombiner::ReduceLoadWidth was converting (trunc i32 (shl i64 v, 32))
into (shl i32 v, 32) into undef. To prevent this, check the shift count
against the final result size.

Patch by: Kevin Schoedel
Reviewed by: Nadav Rotem

llvm-svn: 174972
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/X86/pr14562.ll [new file with mode: 0644]