aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2011-07-26 22:42:13 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2011-07-26 22:42:13 +0000
commit124ac2b997a953ca620d2e339c2b6f6f0fc88abc (patch)
tree2e9ffd42d961fe1f1fbf64bd7829af9cab984a14 /clang/lib/Frontend/CompilerInvocation.cpp
parentf883941903fe8e820d67e466e5b0c3e0b80f8a9b (diff)
downloadllvm-124ac2b997a953ca620d2e339c2b6f6f0fc88abc.zip
llvm-124ac2b997a953ca620d2e339c2b6f6f0fc88abc.tar.gz
llvm-124ac2b997a953ca620d2e339c2b6f6f0fc88abc.tar.bz2
Add a neat little two's complement hack for x86.
On x86 we can't encode an immediate LHS of a sub directly. If the RHS comes from a XOR with a constant we can fold the negation into the xor and add one to the immediate of the sub. Then we can turn the sub into an add, which can be commuted and encoded efficiently. This code is generated for __builtin_clz and friends. llvm-svn: 136167
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions