[PATCH] D129477: [InstCombine][SVE] Bail out of isSafeToLoadUnconditionally for scalable types
David Sherwood via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 11 04:48:10 PDT 2022
david-arm added inline comments.
================
Comment at: llvm/lib/Analysis/Loads.cpp:411
+ return false;
+ APInt Size(DL.getIndexTypeSizeInBits(V->getType()), TySize);
return isSafeToLoadUnconditionally(V, Alignment, Size, DL, ScanFrom, DT, TLI);
----------------
Here you're still relying upon the implicit cast from TypeSize->uint64_t, which we're trying to avoid. I think it's better to write this explicitly as:
APInt Size(DL.getIndexTypeSizeInBits(V->getType()), TySize.getFixedValue());
================
Comment at: llvm/test/Transforms/InstCombine/scalable-select.ll:20
+define <vscale x 2 x i64> @load_scalable_of_selected_ptrs(ptr %p0, ptr %p1, i64 %idx) {
+entry:
+ ; Test introduced in response to a TypeSize warning arising from isSafeToLoadUnconditionally via instcombine.
----------------
This test is missing some CHECK lines
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129477/new/
https://reviews.llvm.org/D129477
More information about the llvm-commits
mailing list