diff options
author | Nikita Popov <npopov@redhat.com> | 2025-01-29 17:27:25 +0100 |
---|---|---|
committer | Nikita Popov <npopov@redhat.com> | 2025-01-29 17:34:10 +0100 |
commit | 8a43d0e8736cf5e0f95a5f02c9b6855a703b2e4e (patch) | |
tree | 17db0005e20b1544c86df50d4929b04462e6bcda /llvm/lib | |
parent | 35defdf4707dfa58802188d2aad1298cddb44cb6 (diff) | |
download | llvm-8a43d0e8736cf5e0f95a5f02c9b6855a703b2e4e.zip llvm-8a43d0e8736cf5e0f95a5f02c9b6855a703b2e4e.tar.gz llvm-8a43d0e8736cf5e0f95a5f02c9b6855a703b2e4e.tar.bz2 |
[Attributor] Check correct IRPosition in AANoCapture::isImpliedByIR()
This case is intended to check the callee argument, not the call-site.
Fixes an issue introduced in #123181.
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Transforms/IPO/AttributorAttributes.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/IPO/AttributorAttributes.cpp b/llvm/lib/Transforms/IPO/AttributorAttributes.cpp index 77f2e1c..17e7fad 100644 --- a/llvm/lib/Transforms/IPO/AttributorAttributes.cpp +++ b/llvm/lib/Transforms/IPO/AttributorAttributes.cpp @@ -5752,7 +5752,8 @@ bool AANoCapture::isImpliedByIR(Attributor &A, const IRPosition &IRP, if (IRP.getPositionKind() == IRP_CALL_SITE_ARGUMENT) if (Argument *Arg = IRP.getAssociatedArgument()) { SmallVector<Attribute, 1> Attrs; - A.getAttrs(IRP, {Attribute::Captures, Attribute::ByVal}, Attrs, + A.getAttrs(IRPosition::argument(*Arg), + {Attribute::Captures, Attribute::ByVal}, Attrs, /* IgnoreSubsumingPositions */ true); bool ArgNoCapture = any_of(Attrs, [](Attribute Attr) { return Attr.getKindAsEnum() == Attribute::ByVal || |