[X86] Use custom isel for gather/scatter instructions.
authorCraig Topper <craig.topper@gmail.com>
Mon, 24 Feb 2020 03:40:29 +0000 (19:40 -0800)
committerCraig Topper <craig.topper@gmail.com>
Mon, 24 Feb 2020 06:33:06 +0000 (22:33 -0800)
commitf1b8ec3398fc0022b825b709eb6e792d35276bc1
treed6c2319a2ef8a0044f01b3d636e67e03475017cb
parent3a6bb32bd24b6f1b01ae2378ea7fa726f453fb1c
[X86] Use custom isel for gather/scatter instructions.

The type profile we use for the isel patterns lied about how
many operands the gather/scatter node has to skip the index
and scale operands. This allowed us to expand the baseptr
operand into base, displacement, and segment and then merge
the index and scale with them in the final instruction during
isel. This is kind of a hack that relies on isel not checking the
number of operands at all.

This commit switches to custom isel where we can manage this
directly without relying on holes in the isel checking.
llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
llvm/lib/Target/X86/X86InstrAVX512.td
llvm/lib/Target/X86/X86InstrFragmentsSIMD.td
llvm/lib/Target/X86/X86InstrSSE.td