This is an archive of the discontinued LLVM Phabricator instance.

[LoopIdiom] Freeze BitPos if !isGuaranteedNotToBeUndefOrPoison
ClosedPublic

Authored by StephenFan on May 29 2023, 11:56 PM.

Diff Detail

Event Timeline

StephenFan created this revision.May 29 2023, 11:56 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 29 2023, 11:56 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
StephenFan requested review of this revision.May 29 2023, 11:56 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 29 2023, 11:56 PM
nikic added inline comments.May 30 2023, 7:42 AM
llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
2403

Maybe it would be more robust to RAUW all uses instead?

nikic accepted this revision.Jun 1 2023, 12:15 AM

LGTM

llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
2403

Add if (!InsertPtr) return false; here, there are some rare edge cases where there is no insertion point.

This revision is now accepted and ready to land.Jun 1 2023, 12:15 AM

Return false if InsertPt is nullptr

This revision was landed with ongoing or failed builds.Jun 6 2023, 11:51 PM
This revision was automatically updated to reflect the committed changes.