[llvm] [MIR] Quote basic block names that are not plain identifiers (PR #214054)
Spencer Bryngelson via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 12 20:00:11 PDT 2026
================
@@ -0,0 +1,27 @@
+; Basic block names that are not plain identifiers must be quoted when printed,
+; otherwise the MIR that llc emits cannot be parsed back by llc. The names here
+; contain commas and spaces, which is the shape a Fortran front end emits.
+;
+; Check both that the name is quoted on the way out and that the result parses.
+
+; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx90a -stop-before=greedy -o %t.mir %s
----------------
sbryngelson wrote:
What form do you mean? The test uses `-mtriple=amdgcn-amd-amdhsa -mcpu=gfx90a`, which is what the rest of `llvm/test/CodeGen` uses: 127 files with that spelling, 21 with bare `amdgcn`, one `amdgcn-unknown-amdhsa`. I do not see a target-id-in-triple form anywhere under `llvm/test`. If you mean something newer than that, say which and I will switch.
Worth noting the change is generic CodeGen, not AMDGPU; the triple is only there because the test needs some target. The new error test for the unterminated-quote path is in `MIR/Generic` with no triple at all.
https://github.com/llvm/llvm-project/pull/214054
More information about the llvm-commits
mailing list