[X86] Add pseudo instructions to use MULX with a single destination when the low...
authorCraig Topper <craig.topper@gmail.com>
Sat, 30 May 2020 22:51:56 +0000 (15:51 -0700)
committerCraig Topper <craig.topper@gmail.com>
Sat, 30 May 2020 23:01:01 +0000 (16:01 -0700)
commit07e8a780d81bb58a0c7bd4da6cc0b9beaec3c788
tree8fd6710f406b3ce8ddace05d1a5901b722cb4072
parent1b6d29e06b07e518025b6f06445ad3275d6f5684
[X86] Add pseudo instructions to use MULX with a single destination when the low result isn't used.

The instruction is defined to only produce high result if both
destinations are the same. We can exploit this to avoid
unnecessarily clobbering a register.

In order to hide this from register allocation we use a pseudo
instruction and expand the result during MCInst creation.

Differential Revision: https://reviews.llvm.org/D80500
llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
llvm/lib/Target/X86/X86InstrArithmetic.td
llvm/lib/Target/X86/X86MCInstLower.cpp
llvm/test/CodeGen/X86/atomic-unordered.ll
llvm/test/CodeGen/X86/i128-mul.ll
llvm/test/CodeGen/X86/pr35636.ll