[X86] Fix a subtle bug in the custom execution domain fixing for blends.
authorCraig Topper <craig.topper@intel.com>
Sat, 14 Jul 2018 06:30:30 +0000 (06:30 +0000)
committerCraig Topper <craig.topper@intel.com>
Sat, 14 Jul 2018 06:30:30 +0000 (06:30 +0000)
commit7426cf6717c341717f852142d8d11e81f0d67590
tree8eee1a580d50028e2d4e353710b1c03ec4d33f31
parentd8098f979906c458406fab4ab0773e350cb294a6
[X86] Fix a subtle bug in the custom execution domain fixing for blends.

The code tried to find the immediate by using getNumOperands() on the MachineInstr, but there might be implicit-defs after the immediate that get counted.

Instead use getNumOperands() from the instruction description which will only count the operands that are defined in the td file.

llvm-svn: 337088
llvm/lib/Target/X86/X86InstrInfo.cpp
llvm/test/CodeGen/X86/avx512-shuffles/partial_permute.ll
llvm/test/CodeGen/X86/oddshuffles.ll
llvm/test/CodeGen/X86/vector-shuffle-256-v8.ll
llvm/test/CodeGen/X86/vector-shuffle-512-v16.ll
llvm/test/CodeGen/X86/vector-shuffle-512-v8.ll
llvm/test/CodeGen/X86/vector-zext.ll