[llvm] [update_mir_test_checks] Precommit test for multiple defs of vreg (PR #66482)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 15 02:46:35 PDT 2023


https://github.com/jayfoad created https://github.com/llvm/llvm-project/pull/66482

XFAIL it until it is fixed by an upcoming commit.


>From 8e55421280a283026c43cfba628fc09b9814724a Mon Sep 17 00:00:00 2001
From: Jay Foad <jay.foad at amd.com>
Date: Fri, 15 Sep 2023 10:35:01 +0100
Subject: [PATCH] [update_mir_test_checks] Precommit test for multiple defs of
 vreg

XFAIL it until it is fixed by an upcoming commit.
---
 .../update_mir_test_checks/Inputs/multiple-defs.mir  | 12 ++++++++++++
 .../update_mir_test_checks/multiple-defs.test        |  6 ++++++
 2 files changed, 18 insertions(+)
 create mode 100644 llvm/test/tools/UpdateTestChecks/update_mir_test_checks/Inputs/multiple-defs.mir
 create mode 100644 llvm/test/tools/UpdateTestChecks/update_mir_test_checks/multiple-defs.test

diff --git a/llvm/test/tools/UpdateTestChecks/update_mir_test_checks/Inputs/multiple-defs.mir b/llvm/test/tools/UpdateTestChecks/update_mir_test_checks/Inputs/multiple-defs.mir
new file mode 100644
index 000000000000000..ff12ed7770beca0
--- /dev/null
+++ b/llvm/test/tools/UpdateTestChecks/update_mir_test_checks/Inputs/multiple-defs.mir
@@ -0,0 +1,12 @@
+# RUN: llc -mtriple=x86_64 -run-pass=none -verify-machineinstrs %s -o - | FileCheck %s
+
+---
+name: test
+body: |
+  bb.0:
+    %0:gr32 = IMPLICIT_DEF
+    %1:gr32 = IMPLICIT_DEF
+    %0:gr32 = IMPLICIT_DEF
+    %2:gr32 = IMPLICIT_DEF
+    KILL %0, %2
+...
diff --git a/llvm/test/tools/UpdateTestChecks/update_mir_test_checks/multiple-defs.test b/llvm/test/tools/UpdateTestChecks/update_mir_test_checks/multiple-defs.test
new file mode 100644
index 000000000000000..7271810535a25f5
--- /dev/null
+++ b/llvm/test/tools/UpdateTestChecks/update_mir_test_checks/multiple-defs.test
@@ -0,0 +1,6 @@
+## Check that update_mir_test_checks handles multiple definitions of the same
+## virtual register (after coming out of SSA form).
+
+# RUN: cp -f %S/Inputs/multiple-defs.mir %t.mir && %update_mir_test_checks %t.mir
+# RUN: FileCheck %t.mir < %t.mir
+# XFAIL: *



More information about the llvm-commits mailing list