[llvm-bugs] [Bug 37229] New: Miscompile with the PPC backend after r329047
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Apr 25 00:51:55 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=37229
Bug ID: 37229
Summary: Miscompile with the PPC backend after r329047
Product: new-bugs
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: chandlerc at gmail.com
CC: llvm-bugs at lists.llvm.org
Created attachment 20221
--> https://bugs.llvm.org/attachment.cgi?id=20221&action=edit
IR input
We've found that after r329047 the PPC backend appears to miscompile zlib
v1.2.11 code. Specifically, the gen_bitlen function here:
https://github.com/madler/zlib/blob/master/trees.c#L486
The only functional reproducer we have sadly involves building zlib with a
clang including this revision, linking that zlib against clang itself built
targeting PPC, and then running one of the OpenMP Clang tests that uses PCH
files that are zlib compressed. Literally no other test we have duplicates this
failure. =/
However, turning -O1 off for this file causes the bug to go away, and reverting
this commit produces a single interesting diff in the assembly for this file
and it is within the identified function, so I'm fairly certain the issue is
there.
I don't really have a normal development environment for PPC so its hard for me
to really dig furhter into this, but I will attach the single-function IR file
(which I've cleaned up manually, but left as much intact as possible, notably
debug info so it should be possible to trace what code comes from what part of
the C code in that file), and the good and bad version of the assembly.
The bad version of the assembly was generated by 'llc' running over this IR
file with no extra flags. The good version had this commit reverted in the
'llc' and then run over this IR file with no extra flags.
The diff in the assembly exactly matches the diff we observe in the real build.
--
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/20180425/0630a314/attachment.html>
More information about the llvm-bugs
mailing list