This is an archive of the discontinued LLVM Phabricator instance.

[RISCV} Fold (select_cc (setlt X, Y), 0, ne, trueV, falseV) -> (select_cc X, Y, lt, trueV, falseV)
ClosedPublic

Authored by craig.topper on Mar 6 2021, 5:46 PM.

Details

Summary

A setcc can be created during LegalizeDAG after select_cc has been
created. This combine will enable us to fold these late setccs.

Diff Detail

Event Timeline

craig.topper created this revision.Mar 6 2021, 5:46 PM
craig.topper requested review of this revision.Mar 6 2021, 5:46 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 6 2021, 5:46 PM
Herald added a subscriber: MaskRay. · View Herald Transcript
luismarques accepted this revision.Mar 7 2021, 7:03 AM

LGTM.

llvm/lib/Target/RISCV/RISCVISelLowering.cpp
3803

Nit: "We're" capitalization.

This revision is now accepted and ready to land.Mar 7 2021, 7:03 AM
This revision was landed with ongoing or failed builds.Mar 7 2021, 9:45 AM
This revision was automatically updated to reflect the committed changes.