[llvm-bugs] [Bug 49475] New: compile-time explosion with assumes at -O1
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Mar 8 07:55:30 PST 2021
https://bugs.llvm.org/show_bug.cgi?id=49475
Bug ID: 49475
Summary: compile-time explosion with assumes at -O1
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Scalar Optimizations
Assignee: unassignedbugs at nondot.org
Reporter: haoxintu at gmail.com
CC: llvm-bugs at lists.llvm.org
Hi, all.
This program, small.c, makes Clang-trunk hung on with -O1 at compile time.
$cat small.c
#include <stdint.h>
int a;
void b() {
int c;
uint16_t d;
uint64_t e;
if (d = a) {
uint8_t *f;
for (;;) {
for (; *f;)
f = &d;
uint8_t g = &e;
}
}
for (;;) {
int8_t i;
int32_t j;
int64_t k;
if (a) {
int64_t *l = &e;
j = e - (*l = 0);
for (; i; i++) {
int32_t *m = &j;
k ^= a & (5 ? j || d : 0);
if (d |= (k |= e &= a) >= i - *m)
for (c = 3; c; c)
;
}
}
}
}
$clang -w -c -O1 small.c
//endless compiling
#clang -v
clang version 13.0.0 (https://github.com/llvm/llvm-project
a968e7b82eac364d411c81aae58722a0b3a4b29c)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir:
/home/haoxin/haoxin-data/dut-research/compilers/llvm-project/build-20210304/bin
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.5.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8
Candidate multilib: .;@m64
Selected multilib: .;@m64
Thanks,
Haoxin
--
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/20210308/0c059119/attachment.html>
More information about the llvm-bugs
mailing list