[X86] convertToThreeAddress, make sure second operand of SUB32ri is really an immedia...
authorCraig Topper <craig.topper@intel.com>
Tue, 1 Oct 2019 21:55:55 +0000 (21:55 +0000)
committerCraig Topper <craig.topper@intel.com>
Tue, 1 Oct 2019 21:55:55 +0000 (21:55 +0000)
commit912870573c5f55b3f6dc4494a608e3ee9c2f730d
tree50ca6982e08a99c302d427cd01305a51fa1063a5
parentf7133b797749c4edd91d4ddd8a7a64e319650fad
[X86] convertToThreeAddress, make sure second operand of SUB32ri is really an immediate before calling getImm().

It might be a symbol instead. We can't fold those since we can't
negate them.

Similar for other SUB with immediates.

Fixes PR43529.

llvm-svn: 373397
llvm/lib/Target/X86/X86InstrInfo.cpp
llvm/test/CodeGen/X86/pr43529.ll [new file with mode: 0644]