diff options
author | Evan Cheng <evan.cheng@apple.com> | 2012-06-23 00:29:06 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2012-06-23 00:29:06 +0000 |
commit | 68c2f9a9a79dda533b4e7af346362803d80fe705 (patch) | |
tree | cab796a75f0abf2cbc25fb105410ee865b8b7742 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | de2e5ed4aa22b33f003938fa961edf1519d8bb5b (diff) | |
download | bcm5719-llvm-68c2f9a9a79dda533b4e7af346362803d80fe705.tar.gz bcm5719-llvm-68c2f9a9a79dda533b4e7af346362803d80fe705.zip |
(sub X, imm) gets canonicalized to (add X, -imm)
There are patterns to handle immediates when they fit in the immediate field.
e.g. %sub = add i32 %x, -123
=> sub r0, r0, #123
Add patterns to catch immediates that do not fit but should be materialized
with a single movw instruction rather than movw + movt pair.
e.g. %sub = add i32 %x, -65535
=> movw r1, #65535
sub r0, r0, r1
rdar://11726136
llvm-svn: 159057
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions