This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Generalize combineAddOfBooleanXor to support any boolean not just setcc.
ClosedPublic

Authored by craig.topper on Jul 24 2023, 10:42 AM.

Details

Summary

Instead of checking for setcc, look for any 0/1 value.

Diff Detail

Event Timeline

craig.topper created this revision.Jul 24 2023, 10:42 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 24 2023, 10:42 AM
craig.topper requested review of this revision.Jul 24 2023, 10:42 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 24 2023, 10:42 AM
Herald added subscribers: eopXD, MaskRay. · View Herald Transcript
asb accepted this revision.Jul 25 2023, 5:58 AM

LGTM modulo tiny suggestion for comment.

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

I'd prefer being a little more specific. e.g. "First xor input should be 0 or 1".

This revision is now accepted and ready to land.Jul 25 2023, 5:58 AM