[llvm-bugs] [Bug 34687] New: clang crashes at -O3 with both newgvn and polly: Instruction does not dominate all uses!

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Sep 20 11:54:49 PDT 2017


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

            Bug ID: 34687
           Summary: clang crashes at -O3 with both newgvn and polly:
                    Instruction does not dominate all uses!
           Product: Polly
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Optimizer
          Assignee: polly-dev at googlegroups.com
          Reporter: helloqirun at gmail.com
                CC: llvm-bugs at lists.llvm.org

Unlike Bug 32795, the crash happens in 32-bit mode with both newgvn and polly
enabled.


$ clang-trunk -v
clang version 6.0.0 (trunk 313740) (llvm/trunk 313739)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin


$ clang-trunk -mllvm -polly -mllvm -enable-newgvn -O3 -m32 abc.c
Instruction does not dominate all uses!
  %118 = add <16 x i32> %vec.phi, %116
  %16 = and <16 x i32> %118, <i32 255, i32 255, i32 255, i32 255, i32 255, i32
255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255,
i32 255, i32 255>
Instruction does not dominate all uses!
  %119 = add nuw nsw <16 x i32> %vec.phi94, %117
  %17 = and <16 x i32> %119, <i32 255, i32 255, i32 255, i32 255, i32 255, i32
255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255,
i32 255, i32 255>
fatal error: error in backend: Broken function found, compilation aborted!
clang-6.0: error: clang frontend command failed with exit code 70 (use -v to
see invocation)
clang version 6.0.0 (trunk 313740) (llvm/trunk 313739)
Target: i386-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin
clang-6.0: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and
associated run script.
clang-6.0: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-6.0: note: diagnostic msg: /tmp/abc-fa66e6.c
clang-6.0: note: diagnostic msg: /tmp/abc-fa66e6.sh
clang-6.0: note: diagnostic msg:

********************



$ cat abc.c
char a, b = 8, i = 0;
long c, g;
short d, h, j;
int e, f;
int *k;
void fn1() {
  long l = c;
  for (; g;) {
  l1:
    for (; l;)
      ;
    if (f)
      goto l1;
    for (; j <= 2; j++) {
      e = b;
      a += (b = 0) || i ? *k %= h : (f || d / h) & (l = j || j / e);
    }
  }
}

-- 
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/20170920/308781e5/attachment.html>


More information about the llvm-bugs mailing list