Patch [1/4] in a series to add parsing of predicates and properly parse SVE ZIP1/ZIP2 instructions.
Details
- Reviewers
rengolin kristof.beyls fhahn mcrosier evandro echristo efriedma - Commits
- rGce1e0975f431: [AArch64][SVE] Asm: Add SVE predicate register definitions and parsing support
rG2b6338b2bc82: [AArch64][SVE] Asm: Add SVE predicate register definitions and parsing support
rL320970: [AArch64][SVE] Asm: Add SVE predicate register definitions and parsing support
rL319315: [AArch64][SVE] Asm: Add SVE predicate register definitions and parsing support
Diff Detail
Event Timeline
lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp | ||
---|---|---|
864 | nit: would it be enough to just have isSVERegOfWidth() that works for both predicate and data SVE registers? One less template :) |
Merged together 'isSVEDataVectorRegOfWidth()' and 'isSVEPredicateVectorRegOfWidth()'.
The benefit of this may not necessarily be obvious for this patch, but future patches will add 'isSVE<restricted register class>RegOfWidth()', at which point it will only require an extra line to the switch statement.
Thanks Sander, looks good to me now. I've added Eli and Eric as reviewers, please wait with committing so they can have a look too.
lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp | ||
---|---|---|
4422 | Testcase? (It looks like it should be possible to test this part even without any actual SVE instructions which take a predicate operand.) |
Added tests for the .req directive:
- test/MC/AArch64/SVE/dot-req.s
- test/MC/AArch64/SVE/dot-req-diagnostics.s
lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp | ||
---|---|---|
4422 | Well spotted, thanks! I've added two test files (test/MC/AArch64/SVE/dot-req.s and test/MC/AArch64/SVE/dot-req-diagnostics.s) which also test the SVE data vector variant. |
I had to revert r319315 because of unused functions (due to PPR not yet being used by any instructions).
This will be resolved when we commit this patch together with https://reviews.llvm.org/D40361.
I reverted this patch series in rL321024. It broke parsing of a .s file in libjpeg_turbo. I'll commit a reduced test case for it soon.
I added the test case in rL321029. I think you just need to try using a pvar .req x0 directive and then using that in place of a GPR. It looks like pvar is treated as a predicate register after this change.
nit: would it be enough to just have isSVERegOfWidth() that works for both predicate and data SVE registers? One less template :)