diff options
author | Evan Cheng <evan.cheng@apple.com> | 2010-01-18 21:38:44 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2010-01-18 21:38:44 +0000 |
commit | 1ad0e8b5769f25ca442f3d77bf374d03469010bc (patch) | |
tree | a4413ab41fe7bc56f036ec89728f80bde599b205 /lib/CodeGen/MachineBasicBlock.cpp | |
parent | 2d53c21eca34b77bbe12a5208af9da780d6465c8 (diff) |
Canonicalize -1 - x to ~x.
Instcombine does this but apparently there are situations where this pattern will escape the optimizer and / or created by isel. Here is a case that's seen in JavaScriptCore:
%t1 = sub i32 0, %a
%t2 = add i32 %t1, -1
The dag combiner pattern: ((c1-A)+c2) -> (c1+c2)-A
will fold it to -1 - %a.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93773 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineBasicBlock.cpp')
0 files changed, 0 insertions, 0 deletions