[PATCH] D127642: [RISCV] Fixing undefined physical register issue when subreg liveness tracking enabled.
Fraser Cormack via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 14 00:14:52 PDT 2022
frasercrmck added a comment.
The fix LGTM.
As for the test, I'm wondering: maybe it's good to have a "real-world" test case for this, but couldn't we test it far more simply? As it stands I'm finding it hard to find the actual bug in the test case.
Just to see how small the test case could be, I tried and was able to reproduce the issue with this test:
---
name: foo
tracksRegLiveness: true
stack:
- { id: 0, name: '', type: spill-slot, offset: 0, size: 32, alignment: 8,
stack-id: scalable-vector, callee-saved-register: '', callee-saved-restored: true }
body: |
bb.0:
liveins: $v8m2, $x10, $x11
PseudoVSPILL2_M2 killed $v8m2_v10m2, killed $x10, killed $x11 :: (store unknown-size into %stack.0, align 8)
PseudoRET
...
Perhaps that's a little too simplistic, but it does show off the issue rather cleanly.
================
Comment at: llvm/test/CodeGen/RISCV/rvv/undef-subreg-range.mir:6
+--- |
+ ; ModuleID = '/scratch1/kitoc/llvm-workspace/llvm-project/llvm/test/CodeGen/RISCV/early-clobber-tied-def-subreg-liveness.ll'
+ source_filename = "/scratch1/kitoc/llvm-workspace/llvm-project/llvm/test/CodeGen/RISCV/early-clobber-tied-def-subreg-liveness.ll"
----------------
Regardless of my comment below, we probably don't need these `ModuleID`s or `source_filename`s?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127642/new/
https://reviews.llvm.org/D127642
More information about the llvm-commits
mailing list