[X86] Fix a codegen crash in getSetCCResultType
authorWang, Pengfei <pengfei.wang@intel.com>
Fri, 19 Feb 2021 08:43:30 +0000 (16:43 +0800)
committerWang, Pengfei <pengfei.wang@intel.com>
Fri, 19 Feb 2021 09:30:10 +0000 (17:30 +0800)
commitc98644c2ece2f00da5e4510d6fbd07ef89263220
tree5e96210feb5342e463ee06dfe0d2e1194cb4c50e
parent260f90bb3d1aef90764de3506f86dedd1339e37c
[X86] Fix a codegen crash in getSetCCResultType

This patch fixes some crashes coming from
X86ISelLowering::getSetCCResultType, which would occasionally return
an EVT constructed from an invalid MVT, which has a null Type pointer.

This patch refers to D95434.

Differential Revision: https://reviews.llvm.org/D97036
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/vec3-setcc-crash.ll [new file with mode: 0644]