[PATCH] D58965: [DAGCombiner] Enable UADDO/USUBO vector combine support

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 5 11:23:53 PST 2019


nikic added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:2463
   // If Y + 1 cannot overflow.
   if (N1.getOpcode() == ISD::ADDCARRY && isNullConstant(N1.getOperand(1))) {
     SDValue Y = N1.getOperand(0);
----------------
RKSimon wrote:
> nikic wrote:
> > Should this also become isNullorNullSplat? (Does ADDCARRY support vectors?)
> AFAICT we don't have ISD::ADDCARRY/SUBCARRY support for vectors - it might be safest to just early-out from visitUADDOLike if VT.isVector()?
Bailing out early on isVector() sounds reasonable. The code should be safe as-is, but that would make it more obvious that this transform doesn't apply to vectors.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D58965





More information about the llvm-commits mailing list