[llvm] r266260 - ARM: override cost function to re-enable ConstantHoisting (& fix it).

Tim Northover via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 15 11:23:10 PDT 2016


Hi Arnaud,

> On 15 Apr 2016, at 06:27, Arnaud De Grandmaison <Arnaud.DeGrandmaison at arm.com> wrote:
> Would you mind having a look at those ?

Sure. It looks like hoisting constants out of div/rem instructions (particularly in loops) prevents them being converted into cheaper multiplies. This only causes a slowdown for hardware I have access to on bigfib, but I see the same pattern in fasta's assembly.

Long term, it's probably another issue for GlobalISel. For now, it doesn't seem horribly unreasonable to special-case it in the cost model. I've committed r266464 which should fix it.

Thanks for bisecting the issue.

Tim.


More information about the llvm-commits mailing list