[PATCH] D87227: [SVE] Fix isLoadInvariantInLoop for scalable vectors

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 14 06:02:12 PDT 2020


sdesmalen added inline comments.


================
Comment at: llvm/test/Transforms/LICM/AArch64/sve-load-hoist.ll:11
+  %cmp0 = icmp ugt i32 %n, 0
+  %invst = call {}* @llvm.invariant.start.p0i8(i64 -1, i8* %in8)
+  %in = bitcast i8* %in8 to <vscale x 2 x i64>*
----------------
If you want to test the new condition you added:
```  if (LocSizeInBits.isScalable())
  return false;```
then you need to use a value >= 0 for `llvm.invariant.start`, as otherwise this test will also pass without your change.


================
Comment at: llvm/test/Transforms/LICM/AArch64/sve-load-hoist.ll:29
+
+define void @no_hoist_load2_nxv2i64(<vscale x 2 x i64>* %out, i8* %in8, i32 %n) {
+; CHECK-LABEL: @no_hoist_load2_nxv2i64(
----------------
No code changes in this patch are tested with this test as it doesn't use `llvm.invariant.start`. I think you should remove these tests from the patch, as I suspect they produce warnings and thus deserve fixing separately.


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

https://reviews.llvm.org/D87227



More information about the llvm-commits mailing list