Skip to content

Commit 5facf08

Browse files
authored
[RISCV] Use non-vp select in RISCVGatherScatterLowering. NFCish (llvm#157071)
Similar to llvm#157070 and llvm#157068, let RISCVVLOptimizer do the work.
1 parent a43489d commit 5facf08

File tree

3 files changed

+35
-71
lines changed

3 files changed

+35
-71
lines changed

llvm/lib/Target/RISCV/RISCVGatherScatterLowering.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ bool RISCVGatherScatterLowering::tryCreateStridedLoadStore(IntrinsicInst *II) {
561561
EVL = Builder.CreateElementCount(
562562
Builder.getInt32Ty(), cast<VectorType>(DataType)->getElementCount());
563563

564-
CallInst *Call;
564+
Value *Call;
565565

566566
if (!StoreVal) {
567567
Call = Builder.CreateIntrinsic(
@@ -571,8 +571,7 @@ bool RISCVGatherScatterLowering::tryCreateStridedLoadStore(IntrinsicInst *II) {
571571

572572
// Merge llvm.masked.gather's passthru
573573
if (II->getIntrinsicID() == Intrinsic::masked_gather)
574-
Call = Builder.CreateIntrinsic(Intrinsic::vp_select, {DataType},
575-
{Mask, Call, II->getArgOperand(3), EVL});
574+
Call = Builder.CreateSelect(Mask, Call, II->getArgOperand(3));
576575
} else
577576
Call = Builder.CreateIntrinsic(
578577
Intrinsic::experimental_vp_strided_store,

0 commit comments

Comments
 (0)