[llvm-bugs] [Bug 46115] New: -instcombine with fast flag moves div outside of loop into loop, dramatically regressing performance
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu May 28 00:33:04 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=46115
Bug ID: 46115
Summary: -instcombine with fast flag moves div outside of loop
into loop, dramatically regressing performance
Product: new-bugs
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: elrodc at gmail.com
CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org
Godbolt:
https://godbolt.org/z/3vuZbN
The code divides one vector by a scalar.
The unoptimized IR has
inverse = fdiv 1, scalar
and then multiplies one vector by the inverse in the loop.
With -instcombine, the division is moved into the loop.
Seems like a failure of cost modeling not to realize that divisions are far
more expensive.
With vectors of length 128, this leads to about a 5.6-fold regression in
performance on my 10980xe.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200528/584800b8/attachment-0001.html>
More information about the llvm-bugs
mailing list