[PATCH] D15034: TargetLowering: Improve handling of (setcc ([sz]ext x) 0, cc) in SimplifySetCC

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 10 11:37:06 PST 2015


arsenm added inline comments.

================
Comment at: lib/CodeGen/SelectionDAG/TargetLowering.cpp:1391-1392
@@ +1390,4 @@
+
+        // setcc ([sz]ext (setcc x, y, cc)), 0, setne) -> setcc (x, y, cc)
+        // setcc ([sz]ext (setcc x, y, cc)), 0, seteq) -> setcc (x, Y, inverse(cc))
+        SDValue TopSetCC = N0->getOperand(0);
----------------
tstellarAMD wrote:
> arsenm wrote:
> > What about the opposite compare against the true value case?
> I was concerned this case would break things, since targets have different values for boolean true.  I think the current transform is safe for all targets.
That's easy to check. If it's also just for i1 it doesn't really matter


http://reviews.llvm.org/D15034





More information about the llvm-commits mailing list