[PATCH] D17633: [X86] Reuse EFLAGS and form LOCKed ops when only user is SETCC.
JF Bastien via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 26 09:49:14 PST 2016
jfb added inline comments.
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:25538
@@ +25537,3 @@
+ if (Cmp.getOpcode() != X86ISD::CMP &&
+ (Cmp.getOpcode() != X86ISD::SUB || Cmp.getNode()->hasAnyUseOfValue(0)))
+ return SDValue();
----------------
I find the inverted condition hard to read: IIUC you're trying to continue if the opcode is CMP, or if the opcode is SUB and its result is unused? I know checkBoolTestSetCCCombine does the same, and it's equally confusing IMO :)
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:25571
@@ +25570,3 @@
+
+ SDValue LockOp = lowerAtomicArithWithLOCK(LHS, DAG);
+ DAG.ReplaceAllUsesOfValueWith(LHS.getValue(0),
----------------
Implementation for `lowerAtomicArithWithLOCK`?
http://reviews.llvm.org/D17633
More information about the llvm-commits
mailing list