[PATCH] D104239: [SVE] Fix cast<FixedVectorType> in truncateToMinimalBitwidths

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 5 04:24:23 PDT 2021


sdesmalen added a comment.

Just a few more nits on the test.



================
Comment at: llvm/test/Transforms/LoopVectorize/scalable-trunc-min-bitwidth.ll:4
+
+define void @trunc_minimal_bitwidth(i8* %bptr, i16* %hptr, i32 %sptr, i64 %dptr) {
+; CHECK-LABEL: @trunc_minimal_bitwidth(
----------------
`%dptr` is not a pointer, but rather the number of loop iterations, e.g. `%N`.


================
Comment at: llvm/test/Transforms/LoopVectorize/scalable-trunc-min-bitwidth.ll:4
+
+define void @trunc_minimal_bitwidth(i8* %bptr, i16* %hptr, i32 %sptr, i64 %dptr) {
+; CHECK-LABEL: @trunc_minimal_bitwidth(
----------------
sdesmalen wrote:
> `%dptr` is not a pointer, but rather the number of loop iterations, e.g. `%N`.
sptr is also not a pointer, but rather some store value, e.g. `%val`.


================
Comment at: llvm/test/Transforms/LoopVectorize/scalable-trunc-min-bitwidth.ll:4
+
+define void @trunc_minimal_bitwidth(i8* %bptr, i16* %hptr, i32 %sptr, i64 %dptr) {
+; CHECK-LABEL: @trunc_minimal_bitwidth(
----------------
sdesmalen wrote:
> sdesmalen wrote:
> > `%dptr` is not a pointer, but rather the number of loop iterations, e.g. `%N`.
> sptr is also not a pointer, but rather some store value, e.g. `%val`.
if you make `i16* %hptr` into `i16* noalias %hptr`, then you avoid the memory checks because the compiler knows the data pointed to by `%hptr` doesn't alias with any other memory that's accessed in the function, so it won't have to actively check if there is a dependence between the load/store by adding the compares. See the [[https://llvm.org/docs/LangRef.html#parameter-attributes|LangRef]].


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D104239



More information about the llvm-commits mailing list