https://bugs.llvm.org/show_bug.cgi?id=42965
Bug ID: 42965
Summary: ExitValue rewrite in IndVarSimplify may introduce
extra spills and instructions at no benefit
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Loop Optimizer
Assignee: unassignedb...@nondot.org
Reporter: d.malju...@yandex.ru
CC: llvm-bugs@lists.llvm.org
Created attachment 22369
--> https://bugs.llvm.org/attachment.cgi?id=22369&action=edit
C code showing the issue
When there is a chain of calculations on some variable in a loop which is then
used outside, IndVarSimplify may rewrite its exit value to be independent from
loop adding index computations to the loop header.
When the loop body is big enough (e.g. due to unswitching of nested loops),
this increases register pressure and may lead to spills/reloads.
The example can be seen here: https://godbolt.org/z/_wxzut (the code can also
be found in the attachments).
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs