diff options
| author | Nikita Popov <npopov@redhat.com> | 2024-09-19 09:39:35 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-19 09:39:35 +0200 |
| commit | 4ec4ac15ed47ccb52d79e01c038865817d0cedf6 (patch) | |
| tree | bc6dea85a60fb75dedc47f021d8c051f153a63f1 /llvm/lib/Transforms/Utils/SimplifyCFG.cpp | |
| parent | c18be32185ca10e55bdef0f2d43629ccfb7e89eb (diff) | |
| download | llvm-4ec4ac15ed47ccb52d79e01c038865817d0cedf6.zip llvm-4ec4ac15ed47ccb52d79e01c038865817d0cedf6.tar.gz llvm-4ec4ac15ed47ccb52d79e01c038865817d0cedf6.tar.bz2 | |
[SCEVExpander] Fix addrec cost model (#106704)
The current isHighCostExpansion cost model for addrecs computes the cost
for some kind of polynomial expansion that does not appear to have any
relation to addrec expansion whatsoever.
A literal expansion of an affine addrec is a phi and add (plus the
expansion of start and step). For a non-affine addrec, we get another
phi+add for each additional addrec nested in the step recurrence.
This partially `fixes` https://github.com/llvm/llvm-project/issues/53205
(the runtime unroll test case in this PR).
Diffstat (limited to 'llvm/lib/Transforms/Utils/SimplifyCFG.cpp')
0 files changed, 0 insertions, 0 deletions
