]> granicus.if.org Git - llvm/commit
[SimplifyIndVar] Extract out invariant expression handling
authorPhilip Reames <listmail@philipreames.com>
Tue, 31 Oct 2017 04:19:06 +0000 (04:19 +0000)
committerPhilip Reames <listmail@philipreames.com>
Tue, 31 Oct 2017 04:19:06 +0000 (04:19 +0000)
commit933b96c6fcc59372fb3b21970eb9e092aa592904
treebad3723195e036fb4cee1c7cb2d0d432533e5e2f
parent432bab12b8e4acdaa961d97845387287d69c2c3d
[SimplifyIndVar] Extract out invariant expression handling

Previously, the code returned early from the *function* when it couldn't find a free expansion, it should be returning from the *transform*.  I don't have a test case, noticed this via inspection.

As a follow up, I'm going to revisit the logic in the extract function.  I think that essentially the whole helper routine can be replaced with SCEVExpander, but I wanted to do that in a series of separate commits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316974 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/SimplifyIndVar.cpp