http://llvm.org/bugs/show_bug.cgi?id=4919
Summary: llvm-gcc doesn't optimize simple factorial into a loop
Product: libraries
Version: trunk
Platform: PC
URL: http://codepad.org/2K5gNj3e
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Interprocedural Optimizations
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Created an attachment (id=3469)
--> (http://llvm.org/bugs/attachment.cgi?id=3469)
Original pastebin
This is a forwarded complaint by "bearophile" on LLVM IRC, who unfortunately
never files bugs.
The following naive factorial function does not get optimized into a loop, even
at -O3.
long fact(long x) {
if (x <= 0)
return 1;
else
return x * fact(x - 1);
}
gcc-4.3.3 apparently can do this.
--
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