This is an archive of the discontinued LLVM Phabricator instance.

[SimplifyCFG] Handle MD_noundef when hoisting common codes
ClosedPublic

Authored by StephenFan on Feb 27 2023, 8:51 PM.

Diff Detail

Event Timeline

StephenFan created this revision.Feb 27 2023, 8:51 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 27 2023, 8:51 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
StephenFan requested review of this revision.Feb 27 2023, 8:51 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 27 2023, 8:51 PM

Add test files.

StephenFan added inline comments.Feb 27 2023, 8:57 PM
llvm/lib/Transforms/Utils/SimplifyCFG.cpp
1621–1622

Whether these can be replaced with combineMetadataCSE?

Looks like the new test fails?

llvm/lib/Transforms/Utils/SimplifyCFG.cpp
1621–1622

Yes, let's replace this with combineMetadataForCSE

StephenFan updated this revision to Diff 501729.Mar 1 2023, 6:40 PM

Replace with combinemetadataForCSE and make test more robust.

nikic added inline comments.Mar 1 2023, 11:57 PM
llvm/test/Transforms/SimplifyCFG/hoist-with-metadata.ll
8

Why does this no longer have range metadata? Isn't it supposed to have the merged ranges?

Add back !range metadata

nikic added inline comments.Mar 2 2023, 12:07 AM
llvm/test/Transforms/SimplifyCFG/hoist-with-metadata.ll
2

Can you please rerun it with --check-globals?

Rerun with --check-globals

nikic accepted this revision.Mar 2 2023, 12:16 AM

LGTM

This revision is now accepted and ready to land.Mar 2 2023, 12:16 AM
This revision was landed with ongoing or failed builds.Mar 3 2023, 3:04 AM
This revision was automatically updated to reflect the committed changes.
llvm/test/Transforms/SimplifyCFG/hoist-with-metadata.ll