fallback: legalize: G_ATOMIC_CMPXCHG s8,p0
| Run: | main-bc8218b282-20261015-074651 |
| Kind: | fallback |
| Category: | legalize: G_ATOMIC_CMPXCHG s8,p0 |
| Occurrences: | 4 in 4 configs, 1 test files |
| Snippet from: | forced-atomics.ll @cmpxchg8 via llvm-extract |
| Config: | -mtriple=riscv32 -mattr=+forced-atomics |
| Local check: | reproduces at bc8218b282 |
| Compiler Explorer: | not uploaded (over --godbolt-limit or disabled) |
Snippet:
; Function Attrs: nounwind
define i8 @cmpxchg8(ptr %p) #0 {
%res = cmpxchg ptr %p, i8 0, i8 1 seq_cst seq_cst, align 1
%res.0 = extractvalue { i8, i1 } %res, 0
ret i8 %res.0
}
attributes #0 = { nounwind }
Reproduce:
llc -mtriple=riscv32 -mattr=+forced-atomics -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* snippet.ll -o -
llc -mtriple=riscv32 -mattr=+forced-atomics -global-isel=0 snippet.ll -o -
Local llc output:
remark: <unknown>:0:0: unable to legalize instruction: %6:_(s8) = G_ATOMIC_CMPXCHG %0:_(p0), %3:_, %4:_ :: (load store seq_cst seq_cst (s8) on %ir.p) (in function: cmpxchg8)
warning: Instruction selection used fallback path for cmpxchg8
Occurrences (4):
Generated 2026-10-15 08:05 UTC.