[X86] When creating X86ISD::MGATHER nodes from AVX2 gather intrinsics, cast the mask...
authorCraig Topper <craig.topper@gmail.com>
Mon, 24 Feb 2020 07:00:40 +0000 (23:00 -0800)
committerCraig Topper <craig.topper@gmail.com>
Mon, 24 Feb 2020 07:00:41 +0000 (23:00 -0800)
commit7a7146cf72ad46f706e892f32f64405665f31ba3
tree21d8ec986ff1ebff91499c58c47acb96160afad4
parentf1b8ec3398fc0022b825b709eb6e792d35276bc1
[X86] When creating X86ISD::MGATHER nodes from AVX2 gather intrinsics, cast the mask to integer type.

The gather intrinsics use a floating point mask when the result
type is FP. But we call DemandedBits on the mask assuming its an
integer type. We also use integer types when we create it from
generic IR. So add a bitcast to the intrinsic path to guarantee
the integer type.
llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
llvm/lib/Target/X86/X86ISelLowering.cpp