[llvm-bugs] [Bug 35508] New: Labels generated, but no code above 'O0'
via llvm-bugs
llvm-bugs at lists.llvm.org
Sat Dec 2 20:33:07 PST 2017
https://bugs.llvm.org/show_bug.cgi?id=35508
Bug ID: 35508
Summary: Labels generated, but no code above 'O0'
Product: clang
Version: 5.0
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: LLVM Codegen
Assignee: unassignedclangbugs at nondot.org
Reporter: martino at theheart.ie
CC: llvm-bugs at lists.llvm.org
While reducing a bug in my LLVM Out-of-Tree sources (v5.0.0), I discovered that
the same problem occurs with the official v4.0.0 and v5.0.0 X86 distributions
for Windows and Linux.
When the following example is compiled with 'clang -S -O0' code is correctly
generated, but with '-O1' and above, only labels are generated with no code
following. No error is reported and the exit code is zero.
The minimal test case I could reduce to is as follows:
void func(int *z) {
int *b = 0;
for (int j = 0; j < 16; j++) {
int c = *b;
c -= *z++;
*b++ = c;
}
}
For X86 this produces only the following code (nothing after "# BB#0:"):
.text
.def @feat.00;
.scl 3;
.type 0;
.endef
.globl @feat.00
@feat.00 = 1
.def _func;
.scl 2;
.type 32;
.endef
.globl _func
.p2align 4, 0x90
_func: # @func
# BB#0:
--
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/20171203/87c24301/attachment.html>
More information about the llvm-bugs
mailing list