[llvm] e063969 - [FunctionAttrs] Add another nounwind test (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 13 00:56:08 PDT 2023
Author: Nikita Popov
Date: 2023-04-13T09:56:01+02:00
New Revision: e0639695d36792febb8c539a51e018d866689a5e
URL: https://github.com/llvm/llvm-project/commit/e0639695d36792febb8c539a51e018d866689a5e
DIFF: https://github.com/llvm/llvm-project/commit/e0639695d36792febb8c539a51e018d866689a5e.diff
LOG: [FunctionAttrs] Add another nounwind 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 c8d0a8763bd3e..e00499fc59d61 100644
--- a/llvm/test/Transforms/FunctionAttrs/nounwind.ll
+++ b/llvm/test/Transforms/FunctionAttrs/nounwind.ll
@@ -289,6 +289,45 @@ unreachable:
unreachable
}
+define void @catchswitch_cleanuppad() personality ptr @__gxx_personality_v0 {
+; CHECK: Function Attrs: noreturn nounwind
+; CHECK-LABEL: define {{[^@]+}}@catchswitch_cleanuppad
+; CHECK-SAME: () #[[ATTR3]] personality ptr @__gxx_personality_v0 {
+; CHECK-NEXT: invoke void @do_throw()
+; CHECK-NEXT: to label [[UNREACHABLE:%.*]] unwind label [[CS:%.*]]
+; CHECK: cs:
+; CHECK-NEXT: [[TOK:%.*]] = catchswitch within none [label %catch] unwind label [[CPAD:%.*]]
+; CHECK: catch:
+; CHECK-NEXT: [[C:%.*]] = catchpad within [[TOK]] [ptr @catch_ty, i32 0, ptr null]
+; CHECK-NEXT: call void @abort()
+; CHECK-NEXT: unreachable
+; 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 %cs
+
+cs:
+ %tok = catchswitch within none [label %catch] unwind label %cpad
+
+catch:
+ %c = catchpad within %tok [ptr @catch_ty, i32 0, ptr null]
+ call void @abort()
+ unreachable
+
+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