[PATCH] D117210: [CodeGen] Support folds of not(cmp(cc, ...)) -> cmp(!cc, ...) for scalable vectors

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 28 04:32:30 PST 2022


sdesmalen added a comment.

Thanks for the change, I think this is an improvement since we can now reuse some existing code for recognising the splat!



================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:911
+  if (N.getOpcode() != ISD::SELECT_CC || !TLI.isConstTrueVal(N.getOperand(2)) ||
       !TLI.isConstFalseVal(N.getOperand(3).getNode()))
     return false;
----------------
Can you update isConstFalseVal as well to only take an SDValue as part of this patch?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D117210/new/

https://reviews.llvm.org/D117210



More information about the llvm-commits mailing list