[PATCH] D101383: [PowerPC] Enable safe for 32bit vins* P10 instructions

Nemanja Ivanovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 7 06:32:08 PDT 2021


nemanjai added inline comments.


================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1250
 
-    if (Subtarget.isISA3_1())
+    if (Subtarget.isISA3_1() && Subtarget.isPPC64())
       setOperationAction(ISD::INSERT_VECTOR_ELT, MVT::v2i64, Custom);
----------------
I don't really understand how we are custom lowering this on 32-bit targets now since you've added this. Where are the PPC-specific insert nodes coming from?


================
Comment at: llvm/lib/Target/PowerPC/PPCInstrPrefix.td:2758
 
-let Predicates = [IsISA3_1, HasVSX, IsBigEndian] in {
+let Predicates = [IsISA3_1, HasVSX, IsBigEndian, IsPPC32] in {
+  // Indexed vector insert element
----------------
ZarkoCA wrote:
> I preferred to split the 32/64bit implementations mainly to keep 64bit as is.  I noticed that there were no other predicate definitions in this file and they can be moved if that's preferred. 
This is fine.


================
Comment at: llvm/lib/Target/PowerPC/PPCInstrPrefix.td:2771
+            (VINSWLX $vDi, $rB, (LWZ memri:$rA))>;
+  def : Pat<(v4f32 (PPCvecinsertelt v4f32:$vDi, (f32 (load iaddrX34:$rA)), i32:$rB)),
+            (VINSWLX $vDi, $rB, (PLWZ memri34:$rA))>;
----------------
Nit: line too long (here and elsewhere).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101383



More information about the llvm-commits mailing list