This is an archive of the discontinued LLVM Phabricator instance.

[SCEV] Infer flags from binop when scope bounded by unknown
AbandonedPublic

Authored by reames on Oct 2 2021, 12:20 PM.

Details

Reviewers
nikic
efriedma
Summary

This extends the inference used by isSCEVExprNeverPoison to handle the case where the defining scope is bounded by a SCEVUnknown in either the header block or the preheader block of the loop containing the instruction of interest.

This was suggested in review of D109789, and helps recover some of the lost optimization potential there.

This definitely can not land until after D109845 as it exposes the bug being fixed by that patch more often.

Diff Detail