X86 cmp lowering is looking past truncate on the condition node. It should only
authorEvan Cheng <evan.cheng@apple.com>
Tue, 7 Aug 2012 22:21:00 +0000 (22:21 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Tue, 7 Aug 2012 22:21:00 +0000 (22:21 +0000)
commitb64dd5f2b5a9989a8b1006d0aa82428455da039a
treedf623586bcae5d28220d400084de9b4b65342584
parent1299422ee1e7834a8a697b2c915a8bfdada77246
X86 cmp lowering is looking past truncate on the condition node. It should only
do so when the high bits are known zero. This caused a subtle miscompilation.

rdar://12027825

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161451 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/2012-08-07-CmpISelBug.ll [new file with mode: 0644]