This is an archive of the discontinued LLVM Phabricator instance.

[DAGCombiner] Do various combine on uaddo.
ClosedPublic

Authored by deadalnix on Feb 27 2017, 10:49 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

deadalnix created this revision.Feb 27 2017, 10:49 AM
jyknight edited edge metadata.Feb 27 2017, 1:42 PM

This should also have a change for USUBO, shouldn't it?

I have to say I haven't dug that much into the SUB case, but it is indeed on my todo list.

RKSimon added inline comments.Mar 9 2017, 9:47 AM
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
1937 ↗(On Diff #90634)

Similar to D30437 - please add an early out for vectors.

deadalnix added inline comments.Mar 9 2017, 9:57 AM
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
1937 ↗(On Diff #90634)

As far as I know, there is no vector version fo this op.

RKSimon added inline comments.Mar 9 2017, 10:23 AM
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
1937 ↗(On Diff #90634)

Yes I don't think we can generate them at the moment, but I know other code (such as in computeKnownBits and computeNumSignBits) already check for overflow vector types if/when we do get around to supporting them.

deadalnix updated this revision to Diff 91205.Mar 9 2017, 11:53 AM

Add bail out for vector types.

RKSimon accepted this revision.Mar 9 2017, 1:04 PM

LGTM

This revision is now accepted and ready to land.Mar 9 2017, 1:04 PM
This revision was automatically updated to reflect the committed changes.