[PATCH] [X86] Don't transform atomic-load-add into an inc/dec when inc/dec is slow

Robin Morisset morisset at google.com
Wed Oct 8 15:45:15 PDT 2014


================
Comment at: lib/Target/X86/X86ISelDAGToDAG.cpp:1711
@@ -1710,1 +1710,3 @@
+getAtomicLoadArithTargetConstant(SelectionDAG *CurDAG, SDLoc dl,
+                                 enum AtomicOpc &Op, MVT NVT, SDValue Val) {
   if (ConstantSDNode *CN = dyn_cast<ConstantSDNode>(Val)) {
----------------
jfb wrote:
> Can you keep this `static` and pass in the `Subtarget`?
I could easily do that. I don't see how exactly it would be better, could you explain it to me ?

http://reviews.llvm.org/D5678






More information about the llvm-commits mailing list