diff options
author | Richard Sandiford <rsandifo@linux.vnet.ibm.com> | 2014-01-09 10:49:40 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@linux.vnet.ibm.com> | 2014-01-09 10:49:40 +0000 |
commit | 0f264db3c6928642301fbb4cd2d465d0b8716c6f (patch) | |
tree | e99e0821daf626e70f500fb104aafe4ee4312a01 /clang/lib/CodeGen/CodeGenFunction.cpp | |
parent | f240b487a30c571cb6202e73b88942d03a5ab843 (diff) | |
download | llvm-0f264db3c6928642301fbb4cd2d465d0b8716c6f.zip llvm-0f264db3c6928642301fbb4cd2d465d0b8716c6f.tar.gz llvm-0f264db3c6928642301fbb4cd2d465d0b8716c6f.tar.bz2 |
Match the InstCombine form of rotates by X+C
InstCombine converts (sub 32, (add X, C)) into (sub 32-C, X),
so a rotate left of a 32-bit Y by X+C could appear as either:
(or (shl Y, (add X, C)), (shr Y, (sub 32, (add X, C))))
without InstCombine or:
(or (shl Y, (add X, C)), (shr Y, (sub 32-C, X)))
with it.
We already matched the first form. This patch handles the second too.
llvm-svn: 198860
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
0 files changed, 0 insertions, 0 deletions