OSDN Git Service

[SystemZ] Optimize comparisons with truncated extended loads
authorRichard Sandiford <rsandifo@linux.vnet.ibm.com>
Fri, 20 Dec 2013 11:56:02 +0000 (11:56 +0000)
committerRichard Sandiford <rsandifo@linux.vnet.ibm.com>
Fri, 20 Dec 2013 11:56:02 +0000 (11:56 +0000)
commit23c9710636dec7d2f2278decb8169e8cbf580c3f
tree8a1731a884d1c2df23e2618b026283dcf2fe43f6
parent1fd4e558289771a2d5b70f0da8155e0ba2721a49
[SystemZ] Optimize comparisons with truncated extended loads

If the extension of a loaded value is compared against zero and used in
other arithmetic, InstCombine will change the comparison to use the
unextended load.  It's also possible that the comparison could be against
the unextended load from the outset.

In DAG form this becomes a truncation of an extending load.  We want to
strip the truncation if possible so that we can use load-and-test instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197804 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/SystemZ/SystemZISelLowering.cpp
test/CodeGen/SystemZ/int-cmp-44.ll