[llvm-bugs] [Bug 27703] New: InstCombine hangs (loops forever) at -O1 or higher...

via llvm-bugs llvm-bugs at lists.llvm.org
Tue May 10 12:02:38 PDT 2016


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

            Bug ID: 27703
           Summary: InstCombine hangs (loops forever) at -O1 or higher...
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Scalar Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: cmtice at google.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 16352
  --> https://llvm.org/bugs/attachment.cgi?id=16352&action=edit
.i file to be compiled to reproduce the problem.

On the function mem_benchmark_0 in this attached .i file, if I compile it a -O1
or -O2, clang/llvm goes into an infinite loop in inst combine.  It appears to
be adding/removing items from the worklist indefinitely, while trying to
"combine redundant instructions".  At -O0 it compiles in a matter of seconds. 
At -O2 I aborted it after 30 minutes (and I've seen it run for several hours
before being aborted).

I'm attaching the .i file and also about 10 seconds worth of output from
passing '-mllvm -debug-only=instcombine' to the compile process.

The full command to compile this is:

clang-3.9 -cc1 -triple x86_64-cros-linux-gnu -emit-obj -disable-free
-disable-llvm-verifier -discard-value-names -main-file-name lib_mem.c
-mrelocation-model pic -pic-level 2 -pie-level 2 -mthread-model posix
-mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases
-munwind-tables -fuse-init-array -target-cpu x86-64 -momit-leaf-frame-pointer
-dwarf-column-info -debugger-tuning=gdb -D _FORTIFY_SOURCE=2 -D RUSAGE -D
HAVE_uint=1 -D HAVE_int64_t=1 -D HAVE_pmap_clnt_h -D HAVE_socklen_t -D
HAVE_DRAND48 -D HAVE_SCHED_SETAFFINITY=1 -O2 -ferror-limit 19 -fmessage-length
83 -stack-protector 2 -o lib_mem.o -x c lib_mem.i


This is a regression, as a 3.8 version of clang that we have works just fine on
this file.

-- 
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/20160510/7a490551/attachment.html>


More information about the llvm-bugs mailing list