[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
Mon Jan 11 14:16:36 PST 2016
arsenm added inline comments.
================
Comment at: lib/CodeGen/SelectionDAG/TargetLowering.cpp:1394-1398
@@ +1393,7 @@
+ N0Opc == ISD::SIGN_EXTEND)) ||
+ (N1C->isOne() && N0Opc == ISD::ZERO_EXTEND) ||
+ (N1C->isAllOnesValue() && N0Opc == ISD::SIGN_EXTEND))) {
+
+ bool Inverse = (N1C->isNullValue() && Cond == ISD::SETEQ) ||
+ (!N1C->isNullValue() && Cond == ISD::SETNE);
+
----------------
I think you should use TLI::isConstTrueVal/isConstFalseVal so this only happens if the correct BooleanContents is used
http://reviews.llvm.org/D15034
More information about the llvm-commits
mailing list