[PATCH] D120452: [AArch64] Use simd mov to materialize big fp constants
Allen zhong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 1 07:17:09 PST 2022
Allen marked 2 inline comments as done.
Allen added a comment.
In D120452#3348692 <https://reviews.llvm.org/D120452#3348692>, @Allen wrote:
> a) move case remat-const-float-simd.ll to CodeGen/AArch64
> b) use MOVIv2i32 , and delete unneeded instruction MOVI2s_ns
> c) delete Operand<f32>, and just be a FPImmLeaf
Address all comment
================
Comment at: llvm/lib/Target/AArch64/AArch64InstrFormats.td:1210
+
+def fpimm32Simd : Operand<f32>,
+ FPImmLeaf<f32, [{
----------------
dmgreen wrote:
> This likely doesn't need to be an Operand, it can just be a FPImmLeaf
Yes, verified ok!
================
Comment at: llvm/lib/Target/AArch64/AArch64InstrInfo.td:1551
+// Using the MOVI to materialize fp constants.
+def MOVIv2s_ns : BaseSIMDModifiedImmVectorShift<1, 1, 0b10, V128, "movi", ".2s",
+ [(set (v4f32 V128:$Rd),
----------------
dmgreen wrote:
> This doesn't need to define a new instruction, it can use the existing MOVI (which I believe is probably called MOVIv2i32?)
Thanks, delete unneeded instruction MOVI2s_ns
================
Comment at: llvm/lib/Target/AArch64/AArch64InstrInfo.td:1551
+// Using the MOVI to materialize fp constants.
+def MOVIv2s_ns : BaseSIMDModifiedImmVectorShift<1, 1, 0b10, V128, "movi", ".2s",
+ [(set (v2i32 V128:$Rd),
----------------
It's strange that here error with the following info, as it is ok on my local linux ?
> AArch64InstrInfo.td:1551:1: error: Type set is empty for each HW mode in 'MOVIv2s_ns' def MOVIv2s_ns : BaseSIMDModifiedImmVectorShift<1, 1, 0b10, V128, "movi", ".2s",
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120452/new/
https://reviews.llvm.org/D120452
More information about the llvm-commits
mailing list