Commit 1ff4a76
authored
[SPIRVToOCL20] Remove tail from atomic_compare_exchange_strong_explicit call (#2395)
In translation from __spirv_AtomicCompareExchange to OpenCL builtin
atomic_compare_exchange_strong_explicit, a new alloca `expected` is
created and read/written in the OpenCL builtin.
The OpenCL builtin call can't have tail marker since the marker requires
that callee doesn't access alloca from the caller.
Otherwise llvm alias analysis deduces that the alloca isn't accessed by
the call, and instcombine pass replaces the load from the alloca after
the call with the value stored to the alloca before the call.1 parent ff0206f commit 1ff4a76
File tree
2 files changed
+41
-0
lines changed- lib/SPIRV
- test
2 files changed
+41
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
213 | 217 | | |
214 | 218 | | |
215 | 219 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
0 commit comments