This is an archive of the discontinued LLVM Phabricator instance.

[IndVars] IV user should not prevent use widening
ClosedPublic

Authored by mkazantsev on Nov 6 2020, 2:58 AM.

Details

Summary

Sometimes the an instruction we are trying to widen is used by the IV
(which means the instruction is the IV increment). Currently this may
prevent its widening. We should ignore such user because it will be
dead once the transform is done anyways.

Diff Detail

Event Timeline

mkazantsev created this revision.Nov 6 2020, 2:58 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 6 2020, 2:58 AM
fhahn accepted this revision.Nov 6 2020, 6:29 AM

LGTM thanks.

llvm/lib/Transforms/Utils/SimplifyIndVar.cpp
1572

nit: maybe add the same comment as below?

This revision is now accepted and ready to land.Nov 6 2020, 6:29 AM
This revision was automatically updated to reflect the committed changes.