You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[LoopInterchange] Bail out for Scalar Dependencies
We are not handling 'S' scalar dependencies correctly and have at least
the following miscompiles related to that:
[LoopInterchange] incorrect handling of scalar dependencies and dependence vectors starting with ">" llvm#54176
[LoopInterchange] Interchange breaks program correctness llvm#46867
[LoopInterchange] Loops should not interchanged due to dependencies llvm#47259
[LoopInterchange] Loops should not interchanged due to control flow llvm#47401
This patch checks that the dependency matrix has no "S" direction as the
leftmost non-"=" direction in any row. This is a stopgap that prevents
the miscompiles, at the expense of handling less cases, i.e. making
interchange more pessimistic. However, some of the cases that are now
rejected for dependence analysis reasons, were rejected before for other
reasons (e.g. profitability). So at least for the llvm regression tests,
the number of regression are very reasonable.
This should be a stopgap. We would like to get interchange enabled by
default and thus prefer correctness over unsafe transforms, and later
lift this restriction.
0 commit comments