[llvm] [MIR] Allow overriding isSSA, noPhis, noVRegs in MIR input (PR #108546)
Dominik Montada via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 23 03:29:33 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
+...
----------------
gargaroff wrote:
Changed this to be an error.
Why do you think this should fail the machine verifier?
https://github.com/llvm/llvm-project/pull/108546
More information about the llvm-commits
mailing list