This is an archive of the discontinued LLVM Phabricator instance.

[DAG] Fold freeze(bitcast(x)) -> bitcast(freeze(x))
ClosedPublic

Authored by RKSimon on Apr 21 2022, 9:32 AM.

Details

Summary

This is a very specific fold to fix an upstream poor codegen issue.

InstCombine has the much more flexible pushFreezeToPreventPoisonFromPropagating but I don't think we're quite there with DAG/TLI handling for canCreateUndefOrPoison/isGuaranteedNotToBeUndefOrPoison value tracking yet.

Fixes #54911

Diff Detail

Event Timeline

RKSimon created this revision.Apr 21 2022, 9:32 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 21 2022, 9:32 AM
RKSimon requested review of this revision.Apr 21 2022, 9:32 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 21 2022, 9:32 AM
nikic accepted this revision.Apr 22 2022, 1:32 AM

LGTM

This revision is now accepted and ready to land.Apr 22 2022, 1:32 AM
This revision was landed with ongoing or failed builds.Apr 22 2022, 8:43 AM
This revision was automatically updated to reflect the committed changes.