This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Handle seteq/setne conditions for CZERO_NEZ/CZERO_EQZ during isel.
ClosedPublic

Authored by craig.topper on Jul 25 2023, 10:11 AM.

Details

Summary

This removes selectSETCC and adds isel patterns for seteq/setne
conditions.

This removes the duplication of selectSETCC between lowering and
isel. This also gets some cases in xaluo.ll that we missed previously.

Diff Detail

Event Timeline

craig.topper created this revision.Jul 25 2023, 10:11 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 25 2023, 10:11 AM
craig.topper requested review of this revision.Jul 25 2023, 10:11 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 25 2023, 10:11 AM
Herald added subscribers: eopXD, MaskRay. · View Herald Transcript
wangpc accepted this revision.Jul 25 2023, 8:27 PM

LGTM in general.

llvm/lib/Target/RISCV/RISCVInstrInfoXVentana.td
32

These patterns are almost the same as zicond's, is it possible to remove the redundancy?
(Just a weak suggestion, it's OK to ignore it)

This revision is now accepted and ready to land.Jul 25 2023, 8:27 PM
wangpc added inline comments.Jul 26 2023, 9:37 AM
llvm/lib/Target/RISCV/RISCVInstrInfoXVentana.td
44

Should be VT_MASKC?

llvm/test/CodeGen/RISCV/condops.ll
1090

This change is strange.

craig.topper added inline comments.Jul 26 2023, 9:45 AM
llvm/lib/Target/RISCV/RISCVInstrInfoXVentana.td
44

Oops. Thanks!

This revision was landed with ongoing or failed builds.Jul 26 2023, 10:06 AM
This revision was automatically updated to reflect the committed changes.