[PATCH] D152896: [update_mir_test_checks] Tolerate -simplify-mir output
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 14 05:16:08 PDT 2023
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGe829eb9075c4: [update_mir_test_checks] Tolerate -simplify-mir output (authored by foad).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152896/new/
https://reviews.llvm.org/D152896
Files:
llvm/test/tools/UpdateTestChecks/update_mir_test_checks/Inputs/x86-simplify-mir.ll
llvm/test/tools/UpdateTestChecks/update_mir_test_checks/Inputs/x86-simplify-mir.ll.expected
llvm/test/tools/UpdateTestChecks/update_mir_test_checks/x86-simplify-mir.test
llvm/utils/update_mir_test_checks.py
Index: llvm/utils/update_mir_test_checks.py
===================================================================
--- llvm/utils/update_mir_test_checks.py
+++ llvm/utils/update_mir_test_checks.py
@@ -57,10 +57,10 @@
r"\n"
r"^ *name: *(?P<func>[A-Za-z0-9_.-]+)$"
r".*?"
- r"^ *fixedStack: *(\[\])? *\n"
+ r"(?:^ *fixedStack: *(\[\])? *\n"
r"(?P<fixedStack>.*?)\n?"
r"^ *stack:"
- r".*?"
+ r".*?)?"
r"^ *body: *\|\n"
r"(?P<body>.*?)\n"
r"^\.\.\.$",
Index: llvm/test/tools/UpdateTestChecks/update_mir_test_checks/x86-simplify-mir.test
===================================================================
--- /dev/null
+++ llvm/test/tools/UpdateTestChecks/update_mir_test_checks/x86-simplify-mir.test
@@ -0,0 +1,5 @@
+# REQUIRES: x86-registered-target
+## Check that update_mir_test_checks handles -simplify-mir
+
+# RUN: cp -f %S/Inputs/x86-simplify-mir.ll %t.ll && %update_mir_test_checks %t.ll
+# RUN: diff -u %S/Inputs/x86-simplify-mir.ll.expected %t.ll
Index: llvm/test/tools/UpdateTestChecks/update_mir_test_checks/Inputs/x86-simplify-mir.ll.expected
===================================================================
--- /dev/null
+++ llvm/test/tools/UpdateTestChecks/update_mir_test_checks/Inputs/x86-simplify-mir.ll.expected
@@ -0,0 +1,9 @@
+; NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
+; RUN: llc < %s -mtriple=x86_64 -stop-after=finalize-isel -simplify-mir | FileCheck %s
+
+define void @f() {
+ ; CHECK-LABEL: name: f
+ ; CHECK: bb.0 (%ir-block.0):
+ ; CHECK-NEXT: RET 0
+ ret void
+}
Index: llvm/test/tools/UpdateTestChecks/update_mir_test_checks/Inputs/x86-simplify-mir.ll
===================================================================
--- /dev/null
+++ llvm/test/tools/UpdateTestChecks/update_mir_test_checks/Inputs/x86-simplify-mir.ll
@@ -0,0 +1,5 @@
+; RUN: llc < %s -mtriple=x86_64 -stop-after=finalize-isel -simplify-mir | FileCheck %s
+
+define void @f() {
+ ret void
+}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152896.531272.patch
Type: text/x-patch
Size: 1983 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230614/f8494bd1/attachment.bin>
More information about the llvm-commits
mailing list