http://llvm.org/bugs/show_bug.cgi?id=2435

           Summary: likely bad codegen bug
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]
                CC: [email protected]


For recent svn targeting ia32.

The generated code does not store to g_139 at all.  It should.

[EMAIL PROTECTED] tmp18]$ cat small.c
typedef int int32_t;
typedef unsigned int uint32_t;
int32_t g_139;

void func_56 (int32_t p_60)
{
  g_139 = 1;
  if (p_60) {
    for (1; 1; 1)
      g_139 = 1;
  }
}

[EMAIL PROTECTED] tmp18]$ llvm-gcc -O small.c -S --emit-llvm -o -
; 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_139 = common global i32 0            ; <i32*> [#uses=0]

define void @func_56(i32 %p_60) nounwind  {
entry:
        %tmp1 = icmp eq i32 %p_60, 0            ; <i1> [#uses=1]
        br i1 %tmp1, label %return, label %bb

bb:             ; preds = %entry, %bb
        br label %bb

return:         ; preds = %entry
        ret void
}


-- 
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

Reply via email to