The MIRParser expects unnamed stack entries to have empty names ('').
In case of unnamed alloca instructions, the MIRPrinter would output
'<unnamed alloca>', which caused the MIRParser to reject the generated
code.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
The test isn't Generic since it uses aarch64, it should go under AArch64
llvm/test/CodeGen/MIR/Generic/unnamed-stack.ll | ||
---|---|---|
1 ↗ | (On Diff #313282) | I didn't know && worked in run lines. Should either use a separate run line with the temp file, or just pipe directly to the second llc |
5–6 ↗ | (On Diff #313282) | Probably should check the frame object list too |
It seems patch should include update for alloca-crspill.ll test (failed Unit Tests precheckin).
Moved testcase to correct location
Split RUN into multiple lines
Added check of frame object list
Fixed failing testcase
llvm/test/CodeGen/MIR/AArch64/unnamed-stack.ll | ||
---|---|---|
2–3 | As I understand, you don't need the second run line, you can just use the output of the first one with "| FileCheck" and without storing a temporary file. |
llvm/test/CodeGen/MIR/AArch64/unnamed-stack.ll | ||
---|---|---|
4 | Add a brief comment explaining that this checks round tripping anonymous allocas |
llvm/test/CodeGen/MIR/AArch64/unnamed-stack.ll | ||
---|---|---|
4 | Ok, for roundtrip it can be used like llc -O0 -march aarch64 -global-isel -stop-after=irtranslator -o - %s | llc -x mir llc -march aarch64 -run-pass=none -o - | FileCheck %s without creating a temporary file. |
As I understand, you don't need the second run line, you can just use the output of the first one with "| FileCheck" and without storing a temporary file.