Unpredicated copy of repeating immediate pattern to SVE vector, along
with MOV-aliases.
Details
Diff Detail
Event Timeline
lib/Target/AArch64/InstPrinter/AArch64InstPrinter.cpp | ||
---|---|---|
1495 | 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 | 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 | 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. |
If was wondering if this could be simplified to: