aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@linux.vnet.ibm.com>2014-01-09 10:56:42 +0000
committerRichard Sandiford <rsandifo@linux.vnet.ibm.com>2014-01-09 10:56:42 +0000
commit15cfc1c33c57aefbfaf9c01a1979f3d7d1a2c806 (patch)
treeb67f047be4e6af4c05314bf5e08ef08fe394cdc3 /clang/lib/CodeGen/CodeGenFunction.cpp
parent0f264db3c6928642301fbb4cd2d465d0b8716c6f (diff)
downloadllvm-15cfc1c33c57aefbfaf9c01a1979f3d7d1a2c806.zip
llvm-15cfc1c33c57aefbfaf9c01a1979f3d7d1a2c806.tar.gz
llvm-15cfc1c33c57aefbfaf9c01a1979f3d7d1a2c806.tar.bz2
Handle masked rotate amounts
At the moment we expect rotates to have the form: (or (shl X, Y), (shr X, Z)) where Y == bitsize(X) - Z or Z == bitsize(X) - Y. This form means that the (or ...) is undefined for Y == 0 or Z == 0. This undefinedness can be avoided by using Y == (C * bitsize(X) - Z) & (bitsize(X) - 1) or Z == (C * bitsize(X) - Y) & (bitsize(X) - 1) for any integer C (including 0, the most natural choice). llvm-svn: 198861
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
0 files changed, 0 insertions, 0 deletions