[PATCH] D57066: [TargetLowering] try harder to determine undef elements of vector binops

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 23 05:31:14 PST 2019


spatel marked 2 inline comments as done.
spatel added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/TargetLowering.cpp:1872
   }
   case ISD::AND: {
     APInt SrcUndef, SrcZero;
----------------
RKSimon wrote:
> (off topic) Can ISD::MUL be supported here?
Yes - I figured we'd do that in a follow-up. We also want to add DAG-only binops such as saturating ops, (f)min/max?


================
Comment at: lib/CodeGen/SelectionDAG/TargetLowering.cpp:1885
     KnownUndef &= SrcUndef;
     KnownUndef &= ~KnownZero;
     break;
----------------
RKSimon wrote:
> Do we need to add getKnownUndefForVectorBinop support here?
Yes, and I started that patch, but I'm struggling to find a case where it makes a difference because 'and C, undef --> 0'. Ie, I think we need to adjust/add the logic for calculating KnownZero to make this worthwhile for 'and'.


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

https://reviews.llvm.org/D57066





More information about the llvm-commits mailing list