[llvm] [NFC][TargetLowering] Make shouldExpandAtomicRMWInIR and shouldExpandAtomicCmpXchgInIR take a const Instruction pointer (PR #176073)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 15 08:42:53 PST 2026


================
@@ -32282,7 +32211,7 @@ void X86TargetLowering::emitBitTestAtomicRMWIntrinsic(AtomicRMWInst *AI) const {
   } else {
     assert(BitTested.second == ShiftBit || BitTested.second == NotShiftBit);
 
-    Value *SI = BitTested.first;
+    Value *SI = const_cast<Value *>(BitTested.first);
----------------
arsenm wrote:

It should be const and fix whatever X86 is doing 

https://github.com/llvm/llvm-project/pull/176073


More information about the llvm-commits mailing list