[X86] Remove extra getOperand(0) call from recently introduced store(extract_element...
authorCraig Topper <craig.topper@intel.com>
Tue, 25 Aug 2020 23:00:12 +0000 (16:00 -0700)
committerCraig Topper <craig.topper@intel.com>
Tue, 25 Aug 2020 23:16:54 +0000 (16:16 -0700)
commitb8ec8f57764e37e7eebed436332b87b46084eb11
tree0a97bf16358befce0755863b624c06df1f88398b
parent49c371b319ee11f2fc7e47dfe73c0ef8136d0305
[X86] Remove extra getOperand(0) call from recently introduced store(extract_element(vtrunc)) to truncated store combine.

The IsExtractedElement already called getOperand(0) so Extract
here is the source vector. We shouldn't call getOperand(0). This
worked for the original test cases because the result was a
bitcast so the getOperand(0) accidently peeked through the bitcast
which is what we wanted.

In the failing case here, the operand turns out to be undef so
the getOperand(0) asserts because undef has no operands.

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=25184

Differential Revision: https://reviews.llvm.org/D86428
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/oss-fuzz-25184.ll [new file with mode: 0644]