This is an archive of the discontinued LLVM Phabricator instance.

[DAGCombiner] Don't emit select_cc from visitSINT_TO_FP/visitUINT_TO_FP. Use plain select instead.
ClosedPublic

Authored by craig.topper on Feb 29 2020, 5:23 PM.

Details

Summary

Select_cc isn't used by all targets. X86 doesn't have optimizations
for it.

Since we already know the input to the sint_to_fp/uint_to_fp is
a setcc we can just emit a plain select using that setcc as the
condition. Other DAG combines can turn that into a select_cc on
targets that support it.

Diff Detail

Event Timeline

craig.topper created this revision.Feb 29 2020, 5:23 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 29 2020, 5:23 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
RKSimon accepted this revision.Mar 1 2020, 1:21 AM

LGTM

This revision is now accepted and ready to land.Mar 1 2020, 1:21 AM
This revision was automatically updated to reflect the committed changes.