DAGCombine: Also shrink eq compares where the constant is exactly as large as the...
authorBenjamin Kramer <benny.kra@googlemail.com>
Thu, 16 May 2013 18:47:58 +0000 (18:47 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Thu, 16 May 2013 18:47:58 +0000 (18:47 +0000)
commit8401ed21aa7c8ca022aad4b83fc9c63c0b824720
tree9dc9ec90781d9b0616299366f8040ddfa9181272
parentafcca55ff9475cdb97ec576847fc676e95397fb4
DAGCombine: Also shrink eq compares where the constant is exactly as large as the smaller type.

if ((x & 255) == 255)

before: movzbl  %al, %eax
        cmpl  $255, %eax

after:  cmpb  $-1, %al

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182038 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/TargetLowering.cpp
test/CodeGen/X86/shrink-compare.ll