Unpredicated copy of repeating immediate pattern to SVE vector, along
with MOV-aliases.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Target/AArch64/InstPrinter/AArch64InstPrinter.cpp | ||
---|---|---|
1495 ↗ | (On Diff #148407) | If was wondering if this could be simplified to: if (std::is_same<T, int16_t>::value) printImmSVE(PrintVal, O); else O << '#' << formatHex((uint64_t)PrintVal); |
test/MC/AArch64/SVE/mov.s | ||
185 ↗ | (On Diff #148407) | just checking: do we expect dupm here? |
lib/Target/AArch64/InstPrinter/AArch64InstPrinter.cpp | ||
---|---|---|
1495 ↗ | (On Diff #148407) | This code checks the actual (decoded) value. where std::is_same<T, int16_t>::value would just check the type passed to printSVELogicalImm. |
test/MC/AArch64/SVE/mov.s | ||
185 ↗ | (On Diff #148407) | Yes, I think so: mov z0.h, #0x8000 and dupm z0.h, #0x8000 are equivalent and according to the SVE specification MOV is the preferred alias iff SVEMoveMaskPreferred evaluates to true. Since the logical immediate for dupm z0.h, #0x8000 is 0x8000800080008000, the condition as shown below from the pseudo code evaluates to true, causing SVEMoveMaskPreferred to return false: // Check for 'xy00xy00xy00xy00' if imm<63:32> == imm<31:0> && imm<31:16> == imm<15:0> then return FALSE; |
test/MC/AArch64/SVE/mov.s | ||
---|---|---|
185 ↗ | (On Diff #148407) | So I double checked this and GAS assembles this to the DUP instruction, which has mov-alias (mov z0.h, #-32768). I will follow this up with a separate patch to fix it. |