[llvm] 32f7197 - [VP] Use the interface of 'getFunctionalIntrinsicID' to get the non-p… (#68508)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 8 03:14:53 PDT 2023
Author: LiqinWeng
Date: 2023-10-08T18:14:48+08:00
New Revision: 32f719776552542691f14e786400fc222b7416f1
URL: https://github.com/llvm/llvm-project/commit/32f719776552542691f14e786400fc222b7416f1
DIFF: https://github.com/llvm/llvm-project/commit/32f719776552542691f14e786400fc222b7416f1.diff
LOG: [VP] Use the interface of 'getFunctionalIntrinsicID' to get the non-p… (#68508)
…redicated Intrinsic ID
Added:
Modified:
llvm/lib/CodeGen/ExpandVectorPredication.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/ExpandVectorPredication.cpp b/llvm/lib/CodeGen/ExpandVectorPredication.cpp
index 50182ce0bbf278f..53f4b39160fa15e 100644
--- a/llvm/lib/CodeGen/ExpandVectorPredication.cpp
+++ b/llvm/lib/CodeGen/ExpandVectorPredication.cpp
@@ -479,7 +479,7 @@ Value *CachingVPExpander::expandPredicationToCastIntrinsic(IRBuilder<> &Builder,
Value *CastOp = nullptr;
switch (VPI.getIntrinsicID()) {
default:
- llvm_unreachable("Not a VP memory intrinsic");
+ llvm_unreachable("Not a VP cast intrinsic");
case Intrinsic::vp_sext:
CastOp =
Builder.CreateSExt(VPI.getOperand(0), VPI.getType(), VPI.getName());
@@ -705,23 +705,18 @@ Value *CachingVPExpander::expandPredication(VPIntrinsic &VPI) {
return NewNegOp;
}
case Intrinsic::vp_abs:
- return expandPredicationToIntCall(Builder, VPI, Intrinsic::abs);
case Intrinsic::vp_smax:
- return expandPredicationToIntCall(Builder, VPI, Intrinsic::smax);
case Intrinsic::vp_smin:
- return expandPredicationToIntCall(Builder, VPI, Intrinsic::smin);
case Intrinsic::vp_umax:
- return expandPredicationToIntCall(Builder, VPI, Intrinsic::umax);
case Intrinsic::vp_umin:
- return expandPredicationToIntCall(Builder, VPI, Intrinsic::umin);
+ return expandPredicationToIntCall(Builder, VPI,
+ VPI.getFunctionalIntrinsicID().value());
case Intrinsic::vp_fabs:
- return expandPredicationToFPCall(Builder, VPI, Intrinsic::fabs);
case Intrinsic::vp_sqrt:
- return expandPredicationToFPCall(Builder, VPI, Intrinsic::sqrt);
case Intrinsic::vp_maxnum:
- return expandPredicationToFPCall(Builder, VPI, Intrinsic::maxnum);
case Intrinsic::vp_minnum:
- return expandPredicationToFPCall(Builder, VPI, Intrinsic::minnum);
+ return expandPredicationToFPCall(Builder, VPI,
+ VPI.getFunctionalIntrinsicID().value());
case Intrinsic::vp_load:
case Intrinsic::vp_store:
case Intrinsic::vp_gather:
More information about the llvm-commits
mailing list