[update_llc_test_checks] Baseline test for D100027
authorAlex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Tue, 28 Sep 2021 14:09:51 +0000 (15:09 +0100)
committerAlex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Tue, 28 Sep 2021 16:57:36 +0000 (17:57 +0100)
Show that we fail to generate CHECK lines for MIPS64 functions with EH.

Differential Revision: https://reviews.llvm.org/D110408

llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/mips64_eh.ll [new file with mode: 0644]
llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/mips64_eh.ll.expected [new file with mode: 0644]
llvm/test/tools/UpdateTestChecks/update_llc_test_checks/mips64_eh.test [new file with mode: 0644]

diff --git a/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/mips64_eh.ll b/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/mips64_eh.ll
new file mode 100644 (file)
index 0000000..f5bf99c
--- /dev/null
@@ -0,0 +1,15 @@
+; RUN: llc -mtriple=mips64-unknown-linux < %s | FileCheck %s
+; FIXME: doesn't generate any CHECK lines
+
+define i32 @main() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*){
+  %1 = invoke i32 @foo() to label %good unwind label %bad
+good:
+  ret i32 5
+bad:
+  %2 = landingpad { i8*, i32 }
+  cleanup
+  resume { i8*, i32 } %2
+}
+
+declare i32 @foo()
+declare i32 @__gxx_personality_v0(...)
diff --git a/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/mips64_eh.ll.expected b/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/mips64_eh.ll.expected
new file mode 100644 (file)
index 0000000..08535a9
--- /dev/null
@@ -0,0 +1,16 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc -mtriple=mips64-unknown-linux < %s | FileCheck %s
+; FIXME: doesn't generate any CHECK lines
+
+define i32 @main() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*){
+  %1 = invoke i32 @foo() to label %good unwind label %bad
+good:
+  ret i32 5
+bad:
+  %2 = landingpad { i8*, i32 }
+  cleanup
+  resume { i8*, i32 } %2
+}
+
+declare i32 @foo()
+declare i32 @__gxx_personality_v0(...)
diff --git a/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/mips64_eh.test b/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/mips64_eh.test
new file mode 100644 (file)
index 0000000..e45ecd7
--- /dev/null
@@ -0,0 +1,5 @@
+# REQUIRES: mips-registered-target
+## Check that we handle MIPS64 assembly output with an EH asm prologue
+
+# RUN: cp -f %S/Inputs/mips64_eh.ll %t.ll && %update_llc_test_checks %t.ll
+# RUN: diff -u %S/Inputs/mips64_eh.ll.expected %t.ll