[PATCH] D18241: [mips] Fix ATOMIC_CMP_SWAP_WITH_SUCCESS

Tim Northover via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 21 07:55:56 PDT 2016


t.p.northover added a subscriber: t.p.northover.

================
Comment at: lib/Target/Mips/MipsISelLowering.cpp:2364
@@ +2363,3 @@
+
+  SDValue SextOp = DAG.getSExtOrTrunc(Op.getOperand(2), SDLoc(Op), Type);
+  SDValue SetCC = DAG.getSetCC(SDLoc(Op), Type, AtomicCmpSwp, SextOp, ISD::SETEQ);
----------------
I think this should be in LegalizeDAG.cpp, with ZExt or SExt chosen based on a TLI callback. It ought to be a shorter change there, and fix other targets too.


http://reviews.llvm.org/D18241





More information about the llvm-commits mailing list