aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/ExpandVectorPredication.cpp
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2025-03-20 09:20:39 +0100
committerGitHub <noreply@github.com>2025-03-20 09:20:39 +0100
commit0738f706151b41063d09b2dc349cabd471b2476e (patch)
tree9419aab222235a33d282fc715629f7e260509243 /llvm/lib/CodeGen/ExpandVectorPredication.cpp
parentd4b586ad95d7a2d13e49c5e9cee8c5d6611efccb (diff)
downloadllvm-0738f706151b41063d09b2dc349cabd471b2476e.zip
llvm-0738f706151b41063d09b2dc349cabd471b2476e.tar.gz
llvm-0738f706151b41063d09b2dc349cabd471b2476e.tar.bz2
[Intrinsics] Add Intrinsic::getFnAttributes() (NFC) (#132029)
Most places that call Intrinsic::getAttributes() are only interested in the function attributes, so add a separate function for that. The motivation for this is that I'd like to add the ability to specify range attributes on intrinsics, which requires knowing the function type. This avoids needing to know the type for most attribute queries.
Diffstat (limited to 'llvm/lib/CodeGen/ExpandVectorPredication.cpp')
-rw-r--r--llvm/lib/CodeGen/ExpandVectorPredication.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/ExpandVectorPredication.cpp b/llvm/lib/CodeGen/ExpandVectorPredication.cpp
index 67df1cd..1bb0763 100644
--- a/llvm/lib/CodeGen/ExpandVectorPredication.cpp
+++ b/llvm/lib/CodeGen/ExpandVectorPredication.cpp
@@ -121,8 +121,8 @@ static bool maySpeculateLanes(VPIntrinsic &VPI) {
return false;
// Fallback to whether the intrinsic is speculatable.
if (auto IntrID = VPI.getFunctionalIntrinsicID())
- return Intrinsic::getAttributes(VPI.getContext(), *IntrID)
- .hasFnAttr(Attribute::AttrKind::Speculatable);
+ return Intrinsic::getFnAttributes(VPI.getContext(), *IntrID)
+ .hasAttribute(Attribute::AttrKind::Speculatable);
if (auto Opc = VPI.getFunctionalOpcode())
return isSafeToSpeculativelyExecuteWithOpcode(*Opc, &VPI);
return false;