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

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 14 06:24:30 PDT 2020


david-arm marked an inline comment as done.
david-arm 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>*
----------------
sdesmalen wrote:
> 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.
Without my patch the test fails in the same way for both parameters of -1 and 16 because we hoist in both cases. With my patch the test passes in the same way because we bail out at the same point. However, I think I understand why you prefer using 16.


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

https://reviews.llvm.org/D87227



More information about the llvm-commits mailing list