aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Verifier.cpp
diff options
context:
space:
mode:
authorOliver Stannard <oliver.stannard@arm.com>2024-06-07 10:58:10 +0100
committerGitHub <noreply@github.com>2024-06-07 10:58:10 +0100
commit1a5239251ead73ee57f4e2f7fc93433ac7cf18b1 (patch)
treea2c31e3c7dce81d19f390f97e9d9754b5dbeda81 /llvm/lib/IR/Verifier.cpp
parentb87a80d4ebca9e1c065f0d2762e500078c4badca (diff)
downloadllvm-1a5239251ead73ee57f4e2f7fc93433ac7cf18b1.zip
llvm-1a5239251ead73ee57f4e2f7fc93433ac7cf18b1.tar.gz
llvm-1a5239251ead73ee57f4e2f7fc93433ac7cf18b1.tar.bz2
[ARM] r11 is reserved when using -mframe-chain=aapcs (#86951)
When using the -mframe-chain=aapcs or -mframe-chain=aapcs-leaf options, we cannot use r11 as an allocatable register, even if -fomit-frame-pointer is also used. This is so that r11 will always point to a valid frame record, even if we don't create one in every function.
Diffstat (limited to 'llvm/lib/IR/Verifier.cpp')
-rw-r--r--llvm/lib/IR/Verifier.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp
index 684e544..e592720 100644
--- a/llvm/lib/IR/Verifier.cpp
+++ b/llvm/lib/IR/Verifier.cpp
@@ -2322,7 +2322,7 @@ void Verifier::verifyFunctionAttrs(FunctionType *FT, AttributeList Attrs,
if (Attrs.hasFnAttr("frame-pointer")) {
StringRef FP = Attrs.getFnAttr("frame-pointer").getValueAsString();
- if (FP != "all" && FP != "non-leaf" && FP != "none")
+ if (FP != "all" && FP != "non-leaf" && FP != "none" && FP != "reserved")
CheckFailed("invalid value for 'frame-pointer' attribute: " + FP, V);
}