Fix the x86 test-shrink optimization so that it doesn't shrink comparisons
authorDan Gohman <gohman@apple.com>
Fri, 9 Oct 2009 20:35:19 +0000 (20:35 +0000)
committerDan Gohman <gohman@apple.com>
Fri, 9 Oct 2009 20:35:19 +0000 (20:35 +0000)
commit11596ed43c5eb3b8a49f563abdbdb7ea54fec991
treef0257363f319352fa9243e8650cc0a8582992427
parent83815aeb29fbc642cb5f84347d2bccd1faa1d45a
Fix the x86 test-shrink optimization so that it doesn't shrink comparisons
when one of the bits being tested would end up being the sign bit in the
narrower type, and a signed comparison is being performed, since this would
change the result of the signed comparison. This fixes PR5132.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83670 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelDAGToDAG.cpp
test/CodeGen/X86/test-shrink-bug.ll [new file with mode: 0644]