[llvm-bugs] [Bug 28880] New: GVNHoist leads to miscompile of llvm test-suite SingleSource/Benchmarks/Misc/fbench.c

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Aug 5 19:21:06 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=28880

            Bug ID: 28880
           Summary: GVNHoist leads to miscompile of llvm test-suite
                    SingleSource/Benchmarks/Misc/fbench.c
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Scalar Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: matze at braunis.de
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

GVN-hoist appears to miscompile SingleSource/Benchmarks/Misc/fbench.c as this
builder:

http://lab.llvm.org:8080/green/job/Performance_O3flto/

is broken after r277786 "GVN-hoist: enable by default".

Citing Sebastians analysis: "

 think there is a problem with the MemorySSA when compiling fbench with -Ofast
The problem appears with -mllvm -gvn-max-hoisted=63, (at 62 the
program is not miscompiled.)
before.ll is the MSSA dump at 62 and after.ll is the MSSA for 63.

We end up hoisting two loads past a store, and the loads do not link
to the store: they are both liveOnEntry:

; MemoryUse(liveOnEntry)
 %19 = load double, double* @axis_slope_angle, align 8, !tbaa !5

and

; MemoryUse(liveOnEntry)
 %22 = load double, double* @axis_slope_angle, align 8, !tbaa !5

past a store to the global variable:

; 7 = MemoryDef(liveOnEntry)
 store double 0.000000e+00, double* @axis_slope_angle, align 8, !tbaa !5
"

-- 
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/20160806/77eb9061/attachment.html>


More information about the llvm-bugs mailing list