Commit 276056e
[AArch64][GlobalISel] Alternative fix: widen atomic stores in legalizer
Per review suggestion from @xal-0, handle the atomic store issue in the
legalizer instead of copyPhysReg. This adds a widenScalarIf rule for
G_STORE that widens scalar types narrower than 32 bits to s32 for atomic
stores with release ordering or stronger.
This approach:
- Fixes the original bug (mrs instead of fmov for half->i16 atomic store)
- Enables stlurb/stlurh codegen for GISel (removes two TODOs)
- Is a more appropriate place to handle type legalization
Co-authored-by: Claude <noreply@anthropic.com>1 parent c93d641 commit 276056e
File tree
3 files changed
+8
-8
lines changed- llvm
- lib/Target/AArch64/GISel
- test/CodeGen/AArch64
- Atomics
- GlobalISel
3 files changed
+8
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
568 | 568 | | |
569 | 569 | | |
570 | 570 | | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
571 | 575 | | |
572 | 576 | | |
573 | 577 | | |
| |||
Lines changed: 2 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
357 | 357 | | |
358 | 358 | | |
359 | 359 | | |
360 | | - | |
361 | 360 | | |
362 | 361 | | |
363 | 362 | | |
364 | | - | |
365 | | - | |
| 363 | + | |
366 | 364 | | |
367 | 365 | | |
368 | 366 | | |
| |||
374 | 372 | | |
375 | 373 | | |
376 | 374 | | |
377 | | - | |
378 | 375 | | |
379 | 376 | | |
380 | 377 | | |
381 | | - | |
382 | | - | |
| 378 | + | |
383 | 379 | | |
384 | 380 | | |
385 | 381 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
0 commit comments