This is an archive of the discontinued LLVM Phabricator instance.

[GVN] Freeze SrcVal if materializes load to a smaller type load
Needs RevisionPublic

Authored by StephenFan on Jul 24 2023, 6:07 AM.

Diff Detail

Event Timeline

StephenFan created this revision.Jul 24 2023, 6:07 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 24 2023, 6:07 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
StephenFan requested review of this revision.Jul 24 2023, 6:07 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 24 2023, 6:07 AM

Fix PhaseOrdering test.

nikic requested changes to this revision.Jul 25 2023, 6:00 AM

I don't think this fixes the issue. Let's say we have in memory i32 poison, i32 0. Then we person a load i64 on this and a load i32. Then trunc(freeze(load i64)) will not result in zero, but rather in freeze(poison). The load already propagates poison to the full value, freezing afterwards is too late.

This revision now requires changes to proceed.Jul 25 2023, 6:00 AM