[llvm] [MIR] Allow overriding isSSA, noPhis, noVRegs in MIR input (PR #108546)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 19 23:06:38 PDT 2024
================
@@ -0,0 +1,103 @@
+# RUN: llc -run-pass none -o - %s | FileCheck %s
+# Test that we can disable certain properties that are normally computed. This
+# override is a soft-override (only allows overriding when it relaxes the
+# property). Therefore, a conflicting override (e.g. setting noPhis to true in
+# the presence of PHI nodes) should not result in an error, but instead should
+# use the computed property instead (noPhis = false in the mentioned example).
+
+---
+# CHECK-LABEL: name: TestNoPhis
+# CHECK: noPhis: true
+# CHECK: ...
+name: TestNoPhis
+...
+---
+# CHECK-LABEL: name: TestNoPhisOverride
+# CHECK: noPhis: false
+# CHECK: ...
+name: TestNoPhisOverride
+noPhis: false
+...
+---
+# CHECK-LABEL: name: TestNoPhisOverrideTrue
+# CHECK: noPhis: true
+# CHECK: ...
+name: TestNoPhisOverrideTrue
+noPhis: true
+...
+---
+# CHECK-LABEL: name: TestNoPhisOverrideConflict
+# CHECK: noPhis: false
+# CHECK: ...
+name: TestNoPhisOverrideConflict
+noPhis: true
+tracksRegLiveness: true
+body: |
+ bb.0:
+ %0:_(s32) = IMPLICIT_DEF
+
+ bb.1:
+ %1:_(s32) = PHI %0, %bb.0, %0, %bb.1
+ G_BR %bb.1
+...
----------------
arsenm wrote:
I expect this case to be an error
https://github.com/llvm/llvm-project/pull/108546
More information about the llvm-commits
mailing list