[llvm-bugs] [Bug 49541] New: compile-time explosion with assumes at -O2 and -Os
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Mar 11 08:33:12 PST 2021
https://bugs.llvm.org/show_bug.cgi?id=49541
Bug ID: 49541
Summary: compile-time explosion with assumes at -O2 and -Os
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 code, small.c, is a valid program but makes Clang trunk hung on at compile
time at -O2 and -Os. Note that this issue also occurs in recently released
versions of clang, e.g., clang-10, clang-11.
$cat small.c
#include <stdint.h>
int a;
void b(int c) {
int32_t *d = a;
uint64_t e;
int8_t f = 4;
uint16_t g;
if (0)
j:
if (e <= (*d *= a))
goto j;
i:
if (c ? g %= f : *d)
goto i;
goto j;
}
$clang -O2 -w small.c (or -Os)
//endless compiling
$clang -v
clang version 13.0.0 (https://github.com/llvm/llvm-project
590ac0a26af4c9f63d5564be8c13b12d409a7fd9)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir:
/home/haoxin/haoxin-data/dut-research/compilers/llvm-project/build-20210310/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/20210311/fec1198e/attachment.html>
More information about the llvm-bugs
mailing list