[PATCH] D109584: [VP] Implementing expansion pass for VP load and store.

Lorenzo Albano via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 30 05:50:16 PDT 2022


loralb added inline comments.


================
Comment at: llvm/test/CodeGen/Generic/expand-vp-load-store.ll:34
+; CHECK-NEXT:    [[TMP2:%.*]] = and <2 x i1> [[TMP1]], <i1 true, i1 true>
+; CHECK-NEXT:    [[TMP3:%.*]] = call <2 x i64> @llvm.masked.load.v2i64.p0v2i64(<2 x i64>* [[PTR:%.*]], i32 1, <2 x i1> [[TMP2]], <2 x i64> undef)
+; CHECK-NEXT:    ret <2 x i64> [[TMP3]]
----------------
frasercrmck wrote:
> Shouldn't we see regular `load` here?
If I understand this correctly, since the `evl` value is unknown, using here a regular `load` means we may try to load elements that we should not, hence why we need the masked version


================
Comment at: llvm/test/CodeGen/Generic/expand-vp-load-store.ll:78
+; CHECK-NEXT:    [[TMP2:%.*]] = and <2 x i1> [[TMP1]], <i1 true, i1 true>
+; CHECK-NEXT:    call void @llvm.masked.store.v2i64.p0v2i64(<2 x i64> [[VAL:%.*]], <2 x i64>* [[PTR:%.*]], i32 1, <2 x i1> [[TMP2]])
+; CHECK-NEXT:    ret void
----------------
frasercrmck wrote:
> Same here: regular `store`?
This should work like the `load` above


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

https://reviews.llvm.org/D109584



More information about the llvm-commits mailing list