[PATCH] D15034: TargetLowering: Improve handling of (setcc ([sz]ext x) 0, cc) in SimplifySetCC
Tom Stellard via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 10 11:07:20 PST 2015
tstellarAMD 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);
----------------
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.
http://reviews.llvm.org/D15034
More information about the llvm-commits
mailing list