[LLVMbugs] [Bug 2537] New: -loop-reduce crashes with extremely large stride

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Thu Jul 10 07:58:36 PDT 2008


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

           Summary: -loop-reduce crashes with extremely large stride
           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: sharparrow1 at yahoo.com
                CC: llvmbugs at cs.uiuc.edu


Testcase:

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 = "i686-pc-linux-gnu"

define void @a() {
entry:
        br label %dobody

dobody:         ; preds = %dobody, %entry
        %y.0 = phi i128 [ 0, %entry ], [ %add, %dobody ]
        %x.0 = phi i128 [ 0, %entry ], [ %add2, %dobody ]
        %add = add i128 %y.0, shl (i128 1, i128 64)
        %add2 = add i128 %x.0, shl (i128 1, i128 48)
        call void @b( i128 %add )
        %cmp = icmp ult i128 %add2, shl (i128 1, i128 64)
        br i1 %cmp, label %dobody, label %afterdo

afterdo:                ; preds = %dobody
        ret void
}

declare void @b(i128)

This blows up in -loop-reduce because it blindly uses getSExtValue() without
checking the size of the value.


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