fallback: legalize: G_ATOMIC_CMPXCHG s16,p0
| Run: | explore-bc8218b282-20261015-075519 |
| Kind: | fallback |
| Category: | legalize: G_ATOMIC_CMPXCHG s16,p0 |
| Occurrences: | 4 in 4 configs, 1 test files |
| Snippet from: | forced-atomics.ll @cmpxchg16 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 i16 @cmpxchg16(ptr %p) #0 {
%res = cmpxchg ptr %p, i16 0, i16 1 seq_cst seq_cst, align 2
%res.0 = extractvalue { i16, i1 } %res, 0
ret i16 %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:_(s16) = G_ATOMIC_CMPXCHG %0:_(p0), %3:_, %4:_ :: (load store seq_cst seq_cst (s16) on %ir.p) (in function: cmpxchg16)
warning: Instruction selection used fallback path for cmpxchg16
Occurrences (4):
Generated 2026-10-15 08:05 UTC.