[LLVMbugs] [Bug 2792] New: volatile regression today
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Fri Sep 12 20:28:10 PDT 2008
http://llvm.org/bugs/show_bug.cgi?id=2792
Summary: volatile regression today
Product: new-bugs
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: regehr at cs.utah.edu
CC: llvmbugs at cs.uiuc.edu
This is seen using r56184 on Ubuntu Hardy on ia32.
The bad behavior is new as of 9/12/08 and causes a very high volatile error
rate in random programs. func_1() is translated properly but the copy of it
that is inlined into main is incorrectly optimized away.
regehr at john-home:~/volatile/tmp32$ llvm-gcc -O1 --emit-llvm -S -o - small.c
; ModuleID = 'small.c'
target datalayout =
"e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32"
target triple = "i386-pc-linux-gnu"
@g_102 = common global i32 0 ; <i32*> [#uses=1]
define i32 @func_1() nounwind readonly {
entry:
%0 = volatile load i32* @g_102, align 4 ; <i32> [#uses=1]
ret i32 %0
}
define i32 @main() nounwind readonly {
entry:
ret i32 0
}
regehr at john-home:~/volatile/tmp32$ cat small.c
volatile int g_102;
int func_1 (void);
int func_1 (void)
{
return g_102;
}
int
main (void)
{
func_1 ();
return 0;
}
--
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.
More information about the llvm-bugs
mailing list