[PATCH] D108763: Use type sizes when determining dependence
Malhar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 3 09:20:23 PDT 2021
malharJ added inline comments.
================
Comment at: llvm/test/Transforms/LoopVectorize/depend_diff_types.ll:40
+ %indvars.iv = phi i64 [ 1, %L.LB1_319.preheader ], [ %indvars.iv.next, %L.LB1_319 ]
+ %.dY0001_321.0 = phi i32 [ %1, %L.LB1_319.preheader ], [ %25, %L.LB1_319 ]
+ %5 = getelementptr i64, i64* %3, i64 %indvars.iv
----------------
Looks like this isn't being used anywhere and can be removed ?
If so, can also remove line 65
```
%25 = add nsw i32 %.dY0001_321.0, -1
```
Then also change
```
%26 = icmp sgt i32 %.dY0001_321.0, 1
```
to something like
```
%26 = icmp slt i32 %indvars.iv.next, M
```
================
Comment at: llvm/test/Transforms/LoopVectorize/depend_diff_types.ll:58-63
+ %20 = add nsw i64 %indvars.iv, -1824
+ %21 = getelementptr i64, i64* %4, i64 %20
+ %22 = load i64, i64* %21, align 8, !tbaa !6
+ %23 = add nuw i64 %indvars.iv, 15296
+ %24 = getelementptr i64, i64* %3, i64 %23
+ store i64 %22, i64* %24, align 8, !tbaa !4
----------------
perhaps this can be removed ?
It looks like the IR corresponds to
```
1) v3[i+31] = (v1[1903+i] * v3[1023+i]); // ---> all accesses are double*
2) v3[i+1007] = v1[i+47]; // ---> all accesses are i64*
3) v3[i+16319] = v1[i+79]; // ---> all accesses are i64* (could remove ?)
```
Perhaps we are only concerned with the lines 1 and 2, as they are of different types ?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108763/new/
https://reviews.llvm.org/D108763
More information about the llvm-commits
mailing list