[PATCH] D92230: [SVE][CodeGen] Add DAG combines for s/zext_masked_gather

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 30 09:48:14 PST 2020


sdesmalen added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:3888
       Index.getSimpleValueType().getVectorElementType() == MVT::i32;
+  bool ResNeedsExtend = ExtTy == ISD::EXTLOAD || ExtTy == ISD::SEXTLOAD;
 
----------------
nit: s/ResNeedsExtend/ResNeedsSignExtend/ ?


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:3917
+  if (ResNeedsExtend)
+    Opcode = getExtendedGatherOpcode(Opcode);
+
----------------
nit: `s/getExtendedGatherOpcode/getSignExtendedGatherOpcode/`


================
Comment at: llvm/test/CodeGen/AArch64/sve-masked-gather-legalize.ll:7
+
+define <vscale x 2 x i64> @masked_sgather_nxv2i8(i8* %base, <vscale x 2 x i64> %offsets, <vscale x 2 x i1> %mask, <vscale x 2 x i8> %vals) {
+; CHECK-LABEL: masked_sgather_nxv2i8:
----------------
Can you add a similar test with zero-extend?


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

https://reviews.llvm.org/D92230



More information about the llvm-commits mailing list