This is an archive of the discontinued LLVM Phabricator instance.

[LoongArch] Override TargetLowering::hasAndNotCompare()
ClosedPublic

Authored by gonglingqin on Jan 31 2023, 5:14 PM.

Details

Summary

Override hasAndNotCompare() to use more ANDN instead of using AND
and NOT.
This patch enables the following transforms:
(X & Y) == Y ---> (~X & Y) == 0
(X & Y) != Y ---> (~X & Y) != 0.

Diff Detail

Event Timeline

gonglingqin created this revision.Jan 31 2023, 5:14 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 31 2023, 5:14 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
gonglingqin requested review of this revision.Jan 31 2023, 5:14 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 31 2023, 5:14 PM
xen0n accepted this revision.Jan 31 2023, 5:20 PM
This revision is now accepted and ready to land.Jan 31 2023, 5:20 PM
This revision was landed with ongoing or failed builds.Feb 2 2023, 10:28 PM
This revision was automatically updated to reflect the committed changes.