commit | 1ad0e8b5769f25ca442f3d77bf374d03469010bc | [log] [tgz] |
---|---|---|
author | Evan Cheng <evan.cheng@apple.com> | Mon Jan 18 21:38:44 2010 +0000 |
committer | Evan Cheng <evan.cheng@apple.com> | Mon Jan 18 21:38:44 2010 +0000 |
tree | a4413ab41fe7bc56f036ec89728f80bde599b205 | |
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