You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[CIR] Fix for __atomic_compare_exchange weak arg (#721)
ClangIR was failing on
```
__atomic_compare_exchange_n(&a, &old, 42, true, 5, 5);
```
The `true` was the problem. It would work with a literal `0` or `1`, but
not with a literal `true` or `false`.
The bug was in `isCstWeak` in CIRGenAtomic.cpp, which was only looking
for an integral constant. It didn't recognize a boolean constant and was
falling back on the non-constant path, which isn't implemented yet.
Rewrite `isCstWeak` to check for both intergral and boolean constants.
0 commit comments