[PATCH] D93687: [VE] Extract & insert vector element isel

Simon Moll via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 5 02:56:57 PST 2021


simoll added inline comments.


================
Comment at: llvm/lib/Target/VE/VEISelLowering.cpp:293
 #include "VVPNodes.def"
+
+    setOperationAction(ISD::INSERT_VECTOR_ELT, LegalVecVT, Legal);
----------------
kaz7 wrote:
> The definition of BUILD_VECTOR action and other INSERT_VECTOR_ELT/EXTRACT_VECTOR_ELT actions are separated by VVP actions.
You mean that the `setOperationAction` calls for VVP are not at the top or bottom of the `initVPUActions` function?
If i understand correctly, why does it matter?


================
Comment at: llvm/lib/Target/VE/VEInstrPatternsVec.td:27
+              (SuperRegCast $sy),
               i32:$vl)>;
 }
----------------
kaz7 wrote:
> You can merge these three lines.
Great! I suppose you mean the `VBRDrl` and `VBRDil` patterns. How do i do this? There would need to be a `noop` replacement for the `ImmOp` Operand..


================
Comment at: llvm/test/CodeGen/VE/Vector/extract_elt.ll:35
+
+define fastcc i64 @extract_ri_v512i64(<512 x i64> %v) {
+; CHECK-LABEL: extract_ri_v512i64:
----------------
kaz7 wrote:
> I simply don't understand why this won't cause errors...
Isel legalizes this into two `v256i64` arguments, which are mapped to `v0` and `v1` 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D93687



More information about the llvm-commits mailing list