[SystemZ] Optimize (sext (ashr (shl ...), ...))
authorRichard Sandiford <rsandifo@linux.vnet.ibm.com>
Mon, 13 Jan 2014 15:17:53 +0000 (15:17 +0000)
committerRichard Sandiford <rsandifo@linux.vnet.ibm.com>
Mon, 13 Jan 2014 15:17:53 +0000 (15:17 +0000)
commit80a3301b377a6bdccded883e67ddbfc65cf82d23
tree09ff6ddab232685369d1a0dac9fae4fec103ce26
parent1023a9492f36c7cb67d9a36da270beecfb29e15b
[SystemZ] Optimize (sext (ashr (shl ...), ...))

...into (ashr (shl (anyext X), ...), ...), which requires one fewer
instruction.  The (anyext X) can sometimes be simplified too.

I didn't do this in DAGCombiner because widening shifts isn't a win
on all targets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199114 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/SystemZ/SystemZISelLowering.cpp
lib/Target/SystemZ/SystemZISelLowering.h
test/CodeGen/SystemZ/shift-10.ll