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 | fc47253294047a62b30a2347a0bf421d934fb69c (patch) | |
tree | 7467ad7ae623f8fac5df22bbd2b40edabaca7e6d /lib/Target/TargetMachine.cpp | |
parent | 512be1f83e3481403c0ce5ce678254388a6fb852 (diff) |
(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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159057 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/TargetMachine.cpp')
0 files changed, 0 insertions, 0 deletions