mirror of
https://github.com/intel/llvm.git
synced 2026-01-27 06:06:34 +08:00
[RISCV] Return a vXi1 vector type from getSetCCResultType if V extension is enabled.
nvxXi1 types are legal with V extension and that's the result vmseq/vmsne/vmslt/etc instructions return. No test cases yet because the setcc isel patterns aren't in and we'll need more than basic tests to observe this. I locally tested that this plus D947078, D94168, D94142, and D94149 was enough to be able to handle the overflow result from llvm.sadd.overflow.
This commit is contained in:
@@ -398,6 +398,8 @@ EVT RISCVTargetLowering::getSetCCResultType(const DataLayout &DL, LLVMContext &,
|
||||
EVT VT) const {
|
||||
if (!VT.isVector())
|
||||
return getPointerTy(DL);
|
||||
if (Subtarget.hasStdExtV())
|
||||
return MVT::getVectorVT(MVT::i1, VT.getVectorElementCount());
|
||||
return VT.changeVectorElementTypeToInteger();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user