Handle (shl (anyext (shr ...))) in SimpilfyDemandedBits
authorRichard Sandiford <rsandifo@linux.vnet.ibm.com>
Wed, 16 Oct 2013 10:26:19 +0000 (10:26 +0000)
committerRichard Sandiford <rsandifo@linux.vnet.ibm.com>
Wed, 16 Oct 2013 10:26:19 +0000 (10:26 +0000)
commit5d7e93c0d44a96a416d2f1d1518954d8fed73f40
tree6d5bc862242f179621741d1f2833cde793467b4e
parentd9729ae8c51707d52e437b4c61242a568324855b
Handle (shl (anyext (shr ...))) in SimpilfyDemandedBits

This is really an extension of the current (shl (shr ...)) -> shl optimization.
The main difference is that certain upper bits must also not be demanded.

The motivating examples are the first two in the testcase, which occur
in llvmpipe output.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192783 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/TargetLowering.cpp
test/CodeGen/SystemZ/shift-10.ll [new file with mode: 0644]