OSDN Git Service

Enable (sext x) == C --> x == (trunc C) combine
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Sun, 21 Dec 2014 16:48:42 +0000 (16:48 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Sun, 21 Dec 2014 16:48:42 +0000 (16:48 +0000)
commitd796cf2e013f98288271bed2848b72252b28c73f
treee0898050273bc8ec02ec386633aa61f7dbc27107
parentb8f8f2dbed22ffd7b5e473a7f89e0427e77ef77f
Enable (sext x) == C --> x == (trunc C) combine

Extend the existing code which handles this for zext. This makes this
more useful for targets with ZeroOrNegativeOne BooleanContent and
obsoletes a custom combine SI uses for i1 setcc (sext(i1), 0, setne)
since the constant will now be shrunk to i1.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224691 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/TargetLowering.cpp
lib/Target/R600/SIISelLowering.cpp
test/CodeGen/R600/setcc-opt.ll
test/CodeGen/R600/trunc-cmp-constant.ll [new file with mode: 0644]
test/CodeGen/X86/shrink-compare.ll