http://llvm.org/bugs/show_bug.cgi?id=9539
Summary: Bad code generation with r128175
Product: new-bugs
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: new bugs
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Testcase:
#include <stdio.h>
typedef __int128_t x;
__attribute((noinline)) int a(x i, x j, int *p, int z) {
int k = i>j;
int l = (k?11:111)/z;
asm volatile ("" :::"memory", "rcx", "rax", "rdx", "rbx", "rsi", "rdi",
"rbp", "r9", "r10", "r11", "r12", "r13", "r14", "r15");
*p = l;
if (k) return 201/z;
return 0;
}
int main() {
int x;
printf("%d\n", a(1, 0, &x, 1));
}
The compiled program built with clang crashes on x86-64 Linux. The issue is
that the code generated to spill EFLAGS corrupts values spilled into the red
zone.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs