This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Add CMOV isel pattern for (select (setgt X, Imm), Y, Z)
ClosedPublic

Authored by Miss_Grape on Mar 29 2022, 4:03 AM.

Diff Detail

Event Timeline

Miss_Grape created this revision.Mar 29 2022, 4:03 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 29 2022, 4:03 AM
Miss_Grape requested review of this revision.Mar 29 2022, 4:03 AM

You need more cases to show the advantage of your change.

Miss_Grape updated this revision to Diff 420702.Apr 5 2022, 9:29 PM

Update tests

You need more cases to show the advantage of your change.

Done

craig.topper added inline comments.Apr 6 2022, 8:01 PM
llvm/test/CodeGen/RISCV/select-cc.ll
109

This doesn't look like it's doing what it was supposed to do. The immediate is in a register.

Miss_Grape added inline comments.Apr 6 2022, 8:43 PM
llvm/test/CodeGen/RISCV/select-cc.ll
109

1024 used twice, whicn used sgt and ugt. I changed the immediate value of ugt to 2046

Miss_Grape updated this revision to Diff 421078.Apr 6 2022, 8:44 PM

Update the test case

This revision is now accepted and ready to land.Apr 6 2022, 8:55 PM
This revision was landed with ongoing or failed builds.Apr 6 2022, 10:56 PM
This revision was automatically updated to reflect the committed changes.