[x86] reassociate integer multiplies using machine combiner pass
authorSanjay Patel <spatel@rotateright.com>
Fri, 31 Jul 2015 16:21:55 +0000 (16:21 +0000)
committerSanjay Patel <spatel@rotateright.com>
Fri, 31 Jul 2015 16:21:55 +0000 (16:21 +0000)
commit9ff4626028a1cea315a8105c170262ff8638ef9a
treee941a611ca95bc6b1fb4215f0c7b1ac580f965e1
parent47ea9ece1a17735d4f57f3dd84d86b9102b752cf
[x86] reassociate integer multiplies using machine combiner pass

Add i16, i32, i64 imul machine instructions to the list of reassociation
candidates.

A new bit of logic is needed to handle integer instructions: they have an
implicit EFLAGS operand, so we have to make sure it's dead in order to do
any reassociation with integer ops.

Differential Revision: http://reviews.llvm.org/D11660

llvm-svn: 243756
llvm/lib/Target/X86/X86InstrInfo.cpp
llvm/test/CodeGen/X86/machine-combiner-int.ll [new file with mode: 0644]