[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


           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 =
target triple = "i386-pc-linux-gnu"
@g_102 = common global i32 0            ; <i32*> [#uses=1]

define i32 @func_1() nounwind readonly {
        %0 = volatile load i32* @g_102, align 4         ; <i32> [#uses=1]
        ret i32 %0

define i32 @main() nounwind readonly {
        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;

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