GlobalISel: Don't fail translate on weak cmpxchg
The translation of cmpxchg added by 9481399c specifically skipped weak cmpxchg due to not understanding the meaning. Weak cmpxchg was added in 420a2168. As explained in the commit message, the weak mode is implicit in how ATOMIC_CMP_SWAP_WITH_SUCCESS is lowered. If it's expanded to a regular ATOMIC_CMP_SWAP, it's replaced with a strong cmpxchg. This handling seems weird to me, but this was already following the DAG behavior. I would expect the strong IR instruction to not have the boolean output. Failing that, I might expect the IRTranslator to emit ATOMIC_CMP_SWAP and a constant for the boolean.
Loading
Please sign in to comment