This is an archive of the discontinued LLVM Phabricator instance.

[DAG] Fold (bitcast (logicop (bitcast x), (c))) -> (logicop x, (bitcast c)) iff the current logicop type is illegal
ClosedPublic

Authored by RKSimon on Mar 14 2023, 4:03 AM.

Details

Summary

Try to remove extra bitcasts around logicops if we're dealing with illegal types

Fixes the regressions in D145939

Diff Detail

Event Timeline

RKSimon created this revision.Mar 14 2023, 4:03 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 14 2023, 4:03 AM
RKSimon requested review of this revision.Mar 14 2023, 4:03 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 14 2023, 4:03 AM
Herald added a subscriber: wdng. · View Herald Transcript
foad added a comment.Mar 14 2023, 4:23 AM

Fold (bitcast (logicop (bitcast x), (c))) -> (and x, (bitcast c)) iff the current logicop type is illegal

s/and/logicop/ ?

RKSimon updated this revision to Diff 505029.Mar 14 2023, 4:34 AM
RKSimon retitled this revision from [DAG] Fold (bitcast (logicop (bitcast x), (c))) -> (and x, (bitcast c)) iff the current logicop type is illegal to [DAG] Fold (bitcast (logicop (bitcast x), (c))) -> (logicop x, (bitcast c)) iff the current logicop type is illegal.

Consistently use logicop

arsenm accepted this revision.Mar 14 2023, 7:01 AM
This revision is now accepted and ready to land.Mar 14 2023, 7:01 AM
This revision was landed with ongoing or failed builds.Mar 14 2023, 7:42 AM
This revision was automatically updated to reflect the committed changes.