Skip to content

Commit bac88b5

Browse files
committed
[AArch64] Mark FMOVvXfY_ns as rematerializable, cheap
Otherwise, the register allocator may spill and reload constants that can be rematerialized with a single instruction.
1 parent b00c620 commit bac88b5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

llvm/lib/Target/AArch64/AArch64InstrInfo.td

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8354,6 +8354,7 @@ def : InstAlias<"orr.4s $Vd, $imm", (ORRv4i32 V128:$Vd, imm0_255:$imm, 0)>;
83548354
}
83558355

83568356
// AdvSIMD FMOV
8357+
let isReMaterializable = 1, isAsCheapAsAMove = 1 in {
83578358
def FMOVv2f64_ns : SIMDModifiedImmVectorNoShift<1, 1, 0, 0b1111, V128, fpimm8,
83588359
"fmov", ".2d",
83598360
[(set (v2f64 V128:$Rd), (AArch64fmov imm0_255:$imm8))]>;
@@ -8371,6 +8372,7 @@ def FMOVv8f16_ns : SIMDModifiedImmVectorNoShift<1, 0, 1, 0b1111, V128, fpimm8,
83718372
"fmov", ".8h",
83728373
[(set (v8f16 V128:$Rd), (AArch64fmov imm0_255:$imm8))]>;
83738374
} // Predicates = [HasNEON, HasFullFP16]
8375+
}
83748376

83758377
// AdvSIMD MOVI
83768378

0 commit comments

Comments
 (0)