[PATCH] D90233: [AArch64] Use DUP for BUILD_VECTOR with few different elements.

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 28 00:20:42 PDT 2020


dmgreen added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:9193
   }
-
+  //
   // Empirical tests suggest this is rarely worth it for vectors of length <= 2.
----------------
This can be removed.


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:9205
+      Ops.push_back(Value);
+    SDValue NewVector = LowerBUILD_VECTOR(DAG.getBuildVector(VT, dl, Ops), DAG);
+    // Next, insert the elements that do not match the common value.
----------------
Could this just create a DUP? Or is this so that it does not have to figure out what kind of DUP/DUPLANE to use?


================
Comment at: llvm/test/CodeGen/AArch64/arm64-vector-insertion.ll:33
 
 ; TODO: This should jsut be a dup + clearing lane 4.
 define <4 x float> @test_insert_3_f32_undef_zero_vector(float %a) {
----------------
Comment can be updated too


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D90233



More information about the llvm-commits mailing list