This is an archive of the discontinued LLVM Phabricator instance.

Allow setcc (sext setcc) [0|1] [eq|ne] -> setcc
AbandonedPublic

Authored by arsenm on Jul 19 2014, 11:21 PM.

Details

Reviewers
None
Summary

The cases where the inner setcc was directly compared
was handled, but not if the setcc type needs to be promoted
when comparing.

Remove redundant R600 handling of a subset of cases the existing
function handles.

Diff Detail

Event Timeline

arsenm updated this revision to Diff 11691.Jul 19 2014, 11:21 PM
arsenm retitled this revision from to Allow setcc (sext setcc) [0|1] [eq|ne] -> setcc .
arsenm updated this object.
arsenm edited the test plan for this revision. (Show Details)
arsenm added a subscriber: Unknown Object (MLST).
chandlerc added inline comments.
lib/CodeGen/SelectionDAG/TargetLowering.cpp
1204

I would call it 'nestedSetCCCombine'?

1496

Why only sign_extend? if zext or anyext can't happen here, it seems worth a comment.

arsenm added inline comments.Jul 23 2014, 1:44 PM
lib/CodeGen/SelectionDAG/TargetLowering.cpp
1496

zext doesn't need to be handled because there is already a combine for (zext x) == C --> x == (trunc C). I'm not sure why that doesn't work for sext.

arsenm abandoned this revision.Dec 18 2014, 12:02 PM