| Issue |
114580
|
| Summary |
[AArch64] atomic operations with syncscope::SingleThread wrongly lower to proper atomics
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
gbaraldi
|
I.e
```llvm
define void @foo(ptr nonnull %myptr) {
top:
store atomic i64 320, ptr %myptr syncscope("singlethread") release, align 8
ret void
}
```
lowers to
```s
_foo: ; @foo
mov w8, #320 ; =0x140
stlr x8, [x0]
ret
```
This seems incorrect given that
```llvm
define void @bar(ptr nonnull %myptr) {
top:
store i64 320, ptr %myptr, align 8
fence syncscope("singlethread") release
ret void
}
```
Lowers to
```s
_bar: ; @bar
mov w8, #320 ; =0x140
str x8, [x0]
ret
```
I believe this requires a change in https://github.com/llvm/llvm-project/blob/8e61aaa0211a7d064139f29bebba833b7f3d1d18/llvm/lib/Target/AArch64/AArch64FastISel.cpp#L2195-L2204 but I'm not familiar enough with llvm backend specifics
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs