http://llvm.org/bugs/show_bug.cgi?id=3489
Summary: misoptimization in presence of bitcast/memcpy
Product: new-bugs
Version: unspecified
Platform: Macintosh
OS/Version: MacOS X
Status: NEW
Severity: normal
Priority: P2
Component: new bugs
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Created an attachment (id=2500)
--> (http://llvm.org/bugs/attachment.cgi?id=2500)
input C file
The attached code is being misoptimized by LLVM; I suspect the problem is in
the constant folding of values accessed through the bitcast/memcpy done for ABI
purposes:
--
ddun...@milton:CodeGen$ xcc -arch x86_64 -O0 bad.c -emit-llvm -o bad.bc
ddun...@milton:CodeGen$ llc < bad.bc | gcc -x assembler -
ddun...@milton:CodeGen$ ./a.out; echo $?
0
ddun...@milton:CodeGen$ opt -std-compile-opts < bad.bc | llc | gcc -x assembler
-
ddun...@milton:CodeGen$ ./a.out; echo $?
48
--
--
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