[PATCH] D120452: [AArch64] Use simd mov to materialize big fp constants

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 28 01:30:49 PST 2022


dmgreen added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64InstrFormats.td:1210
+
+def fpimm32Simd : Operand<f32>,
+              FPImmLeaf<f32, [{
----------------
This likely doesn't need to be an Operand, it can just be a FPImmLeaf


================
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),
----------------
This doesn't need to define a new instruction, it can use the existing MOVI (which I believe is probably called MOVIv2i32?)


================
Comment at: llvm/test/Transforms/LoopVectorize/AArch64/remat-const-float-simd.ll:1
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc < %s -mtriple=aarch64-none-linux-gnu -verify-machineinstrs | FileCheck %s
----------------
This test file should be in CodeGen/AArch64


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120452/new/

https://reviews.llvm.org/D120452



More information about the llvm-commits mailing list