<div dir="ltr">Hi LLVM-dev,<div><br></div><div>when working on MLIR-to-LLVM-IR conversion, I noticed that it is possible to programmatically construct a cmpxchg instruction operating on floats (or actually any type since there is no assertion on pointer element type here <a href="https://github.com/llvm/llvm-project/blob/9c2e708f0dc547d386ea528450a33ef4bd2a750b/llvm/lib/IR/Instructions.cpp#L1501">https://github.com/llvm/llvm-project/blob/9c2e708f0dc547d386ea528450a33ef4bd2a750b/llvm/lib/IR/Instructions.cpp#L1501</a>), but LangRef specifies that only integers and pointers are accepted (<a href="https://llvm.org/docs/LangRef.html#cmpxchg-instruction">https://llvm.org/docs/LangRef.html#cmpxchg-instruction</a>). Does somebody rely on other types being accepted in cmpxchg or should we add an assertion for the element type to match the LangRef?<br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div>Alex</div></div></div></div></div></div>