http://llvm.org/bugs/show_bug.cgi?id=9387
Summary: clang/llvm generates __udivdi3 where gcc doesn't
Product: clang
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], [email protected]
Blocks: 4068
given the following code extracted from boot_delay_setup in linux:
unsigned long long loops_per_msec;
extern unsigned long preset_lpj;
void f(void)
{
loops_per_msec = (unsigned long long)preset_lpj / 1000 * 250;
}
llvm emits a call to __udivdi3 whereas gcc optimizes it into a mul/shift
sequence (compiling an i386 kernel where long is 4 bytes, long long is 8). the
problem is that linux doesn't implement __udivdi3 on i386 and relies on the gcc
optimization.
--
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