[PATCH] D130466: [LICM] - Add option to allow data races
Shubham Narlawar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 28 12:56:51 PDT 2022
gsocshubham added inline comments.
================
Comment at: llvm/test/Transforms/LICM/promote-sink-store-arg.ll:73
+entry:
+ %n.addr = alloca i32, align 4
+ %u.addr = alloca i32, align 4
----------------
This IR is obtained from below C code -
```
void f(int n, int u) {
for (int i = 0; i < n; ++i) {
u = i;
}
}
```
================
Comment at: llvm/test/Transforms/LICM/promote-sink-store-constant-global.ll:77
+entry:
+ %n.addr = alloca i32, align 4
+ %x = alloca i32, align 4
----------------
This IR is obtained from C testcase -
```
const int u = 7;
void f(int n) {
int x;
for (int i = 0; i < n; ++i) {
x = u;
}
}
```
================
Comment at: llvm/test/Transforms/LICM/promote-sink-store-global.ll:85
+entry:
+ %n.addr = alloca i32, align 4
+ %a = alloca i32, align 4
----------------
This IR is obtained from C code -
```
int u, v;
void f(int n) {
int a;
for (int i = 0; i < n; ++i) {
u = i;
a = v;
}
}
```
================
Comment at: llvm/test/Transforms/LICM/promote-sink-store.ll:91
+;
+bb:
+ %i = icmp sgt i32 %arg2, 0
----------------
This IR is obtained from below testcase attached from bug description -
```
int u, v;
void f(int a[restrict], int b[restrict], int n) {
for (int i = 0; i < n; ++i) {
if (a[i]) {
++u;
break;
}
++u;
if (b[i])
++v;
}
}
```
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130466/new/
https://reviews.llvm.org/D130466
More information about the llvm-commits
mailing list