This is an archive of the discontinued LLVM Phabricator instance.

[DAG] SimplifySetCC - relax fold (X^C1) == C2 --> X == C1^C2
ClosedPublic

Authored by RKSimon on Apr 4 2022, 5:02 AM.

Details

Summary

Remove limitation that wouldn't perform the fold if all the inverted bits are known zero

The thumb2 changes look to be benign, although it does show that the TEQ/TST isel patterns could probably be improved?

Fixes movmsk regression in D122754

I'm not sure who is actively reviewing MIPS codegen at the moment, and thats the one case which shows a notable improvement :-(

Diff Detail

Event Timeline

RKSimon created this revision.Apr 4 2022, 5:02 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 4 2022, 5:02 AM
RKSimon requested review of this revision.Apr 4 2022, 5:02 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 4 2022, 5:02 AM
dmgreen accepted this revision.Apr 5 2022, 5:40 AM

The Arm changes sound OK. The cmp might actually be better than a teq if it can be shrunk into a smaller instruction - it sounds like we might have some inefficiencies there.

LGTM. https://alive2.llvm.org/ce/z/A_auBq

This revision is now accepted and ready to land.Apr 5 2022, 5:40 AM

These MIPS changes look OK to me.

Thanks everyone - I'll commit this tomorrow

This revision was landed with ongoing or failed builds.Apr 6 2022, 1:18 AM
This revision was automatically updated to reflect the committed changes.