Use add32ri8 and friends on fast isel.
authorRafael Espindola <rafael.espindola@gmail.com>
Fri, 13 Mar 2015 22:18:18 +0000 (22:18 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Fri, 13 Mar 2015 22:18:18 +0000 (22:18 +0000)
commit89c84b0c832091ad707233aa2da41dfa6b2e0240
tree6eda2f5ad7396a10794b0e4e50cfcfa1380c8565
parentd5dd5dcb9c6bd631726c311d6f8d902de48de73e
Use add32ri8 and friends on fast isel.

This fixes pr22854.

The core issue on the bug is that there are multiple instructions that
print the same in assembly. In fact, there doesn't seem to be any
syntax for specifying that a constant that fits in 8 bits should use a 32 bit
immediate.

The attached patch changes fast isel to consider i16immSExt8,
i32immSExt8, and i64immSExt8. They were disabled because fastisel didn’t know
to call the predicate back in the day.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232223 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86InstrInfo.td
test/CodeGen/X86/add32ri8.ll [new file with mode: 0644]
test/DebugInfo/X86/fission-ranges.ll