Commit fab7455
committed
Fix
It would always generate PTX to load only a 1-bit integer (`i1`)
from the provided pointer, regardless of the actual size of `T`.
The alignment specified for the load was also based on the pointer's
alignment, not the pointee's alignment.
This commit changes it to:
1. Load the full `llvm_type_of(T)` instead of `i1`.
2. Use the correct alignment of `T` for the load instruction.
3. Removes an incorrect pointer cast that was based on the return
ABI of `T` rather than the type of the memory being read.
Possibly fixes #208.read_volatile intrinsic1 parent 3b3e049 commit fab7455
1 file changed
+28
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
295 | 295 | | |
296 | 296 | | |
297 | 297 | | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
304 | 322 | | |
305 | 323 | | |
306 | 324 | | |
307 | | - | |
| 325 | + | |
308 | 326 | | |
309 | 327 | | |
310 | | - | |
| 328 | + | |
311 | 329 | | |
| 330 | + | |
312 | 331 | | |
313 | | - | |
| 332 | + | |
314 | 333 | | |
315 | 334 | | |
316 | 335 | | |
| |||
0 commit comments