[llvm] af960a7 - [FunctionAttrs] Add cleanuppad test (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 11 07:30:42 PDT 2023
Author: Nikita Popov
Date: 2023-04-11T16:30:33+02:00
New Revision: af960a772df8e51459733e07f2503da519fe2d1a
URL: https://github.com/llvm/llvm-project/commit/af960a772df8e51459733e07f2503da519fe2d1a
DIFF: https://github.com/llvm/llvm-project/commit/af960a772df8e51459733e07f2503da519fe2d1a.diff
LOG: [FunctionAttrs] Add cleanuppad test (NFC)
Added:
Modified:
llvm/test/Transforms/FunctionAttrs/nounwind.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/FunctionAttrs/nounwind.ll b/llvm/test/Transforms/FunctionAttrs/nounwind.ll
index 4d52e61234ff0..c8d0a8763bd3e 100644
--- a/llvm/test/Transforms/FunctionAttrs/nounwind.ll
+++ b/llvm/test/Transforms/FunctionAttrs/nounwind.ll
@@ -264,6 +264,31 @@ unreachable:
unreachable
}
+define void @cleanuppad() personality ptr @__gxx_personality_v0 {
+; CHECK: Function Attrs: noreturn nounwind
+; CHECK-LABEL: define {{[^@]+}}@cleanuppad
+; CHECK-SAME: () #[[ATTR3]] personality ptr @__gxx_personality_v0 {
+; CHECK-NEXT: invoke void @do_throw()
+; CHECK-NEXT: to label [[UNREACHABLE:%.*]] unwind label [[CPAD:%.*]]
+; CHECK: cpad:
+; CHECK-NEXT: [[CP:%.*]] = cleanuppad within none []
+; CHECK-NEXT: call void @abort()
+; CHECK-NEXT: unreachable
+; CHECK: unreachable:
+; CHECK-NEXT: unreachable
+;
+ invoke void @do_throw()
+ to label %unreachable unwind label %cpad
+
+cpad:
+ %cp = cleanuppad within none []
+ call void @abort()
+ unreachable
+
+unreachable:
+ unreachable
+}
+
declare i32 @__gxx_personality_v0(...)
declare ptr @__cxa_begin_catch(ptr)
More information about the llvm-commits
mailing list