Adds patterns to match the EOR3 instruction.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/test/CodeGen/AArch64/eor3.ll | ||
---|---|---|
5 | CHECK-LABEL: eor3_16x8_left: The diagnostic will be better if something goes off and eor3 v0.16b is absent. |
This doesn't look like it even parses correctly! Nice idea though, it sounds good to add patterns for these three way eor's. I'm surprised they weren't added when the intrinsics were added.
llvm/lib/Target/AArch64/AArch64InstrInfo.td | ||
---|---|---|
985 | There's a comma missing here. The brackets also look off. | |
988 | defm? | |
llvm/test/CodeGen/AArch64/eor3.ll | ||
2 | -mtriple=aarch64-none-eabi? This file can use update_llc_test_checks. Preferably for run lines with and without +sha3 |
llvm/lib/Target/AArch64/AArch64InstrInfo.td | ||
---|---|---|
985 | Oh xor is also commutative. You likely don't need both the patterns, it will be handled automatically by tablegen. Having tests that check that sound good to have though. |
llvm/lib/Target/AArch64/AArch64InstrInfo.td | ||
---|---|---|
985 | I do have tests for the different ways to commute it already. Good call that tblgen should handle the commutation automatically. |
llvm/lib/Target/AArch64/AArch64InstrInfo.td | ||
---|---|---|
983 | I don't the AArch64 ISA, but is it possible one of the xors is a vnot. And if that is possible, is EOR3 what you want to generate or would you want XOR+NOT? |
llvm/lib/Target/AArch64/AArch64InstrInfo.td | ||
---|---|---|
983 | This still behaves correctly with this patch. XOR + VNOT generates EOR + MVN. |
llvm/lib/Target/AArch64/AArch64InstrInfo.td | ||
---|---|---|
983 | Looks like the ImmAllOnesV in the vnot weights as a build_vector plus plus an immediate. Because of that the vnot pattern has complexity 7 and the eor3 pattern has complexity 6. So the vnot gets priority. |
I don't the AArch64 ISA, but is it possible one of the xors is a vnot. And if that is possible, is EOR3 what you want to generate or would you want XOR+NOT?