[llvm-bugs] [Bug 45709] New: misoptimization with defaulting to POWER7 and newer
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Apr 28 01:58:49 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=45709
Bug ID: 45709
Summary: misoptimization with defaulting to POWER7 and newer
Product: libraries
Version: 10.0
Hardware: Other
OS: FreeBSD
Status: NEW
Severity: normal
Priority: P
Component: Backend: PowerPC
Assignee: unassignedbugs at nondot.org
Reporter: pkubaj at anongoth.pl
CC: llvm-bugs at lists.llvm.org, nemanja.i.ibm at gmail.com
Reduced test case:
class a {
void b();
void m_fn2();
int c;
float d[];
};
void a ::b() {
float e;
for (int f; f <= c; f++)
if (e < d[f])
e = d[f];
if (e)
m_fn2();
}
Compile with:
c++ -ffast-math -O2 -c sms.cpp
It builds fine without -ffast-math, or when lowering optimizations to -O1, or
after adding -mcpu=power7 (power8 or power9 are also ok for clang).
Result:
Illegal instruction
--
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/20200428/1445b408/attachment.html>
More information about the llvm-bugs
mailing list