[LLVMbugs] [Bug 8308] New: Module Verify is accepting bad LLVM IR

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Oct 5 15:48:15 PDT 2010


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

           Summary: Module Verify is accepting bad LLVM IR
           Product: tools
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: opt
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: bnwest at rice.edu
                CC: llvmbugs at cs.uiuc.edu


As seen at revision 115615, the following IR is bad yet verify accepts:

define float @bug_loop_v2(float* %a, i32 %start, i32 %stop, i32 %incr) nounwind
ssp {
entry:
  %"alloca point" = bitcast i32 0 to i32
  %0 = sub nsw i32 %start, 1
  %1 = sext i32 %0 to i64
  %2 = getelementptr float* %a, i64 %1
  br label %bb1

bb:                                               ; preds = %bb1
  %3 = load float* %8, align 1
  %4 = fadd float %3, %sum.0
  %5 = getelementptr float* %8, %8
  %6 = add i64 %9, %9
  %7 = add nsw i32 %i.0, %i.0
  br label %bb1

bb1:                                              ; preds = %bb, %entry
  %8 = phi float* [ %2, %entry ], [ %5, %bb ]
  %9 = phi i64 [ %1, %entry ], [ %6, %bb ]
  %i.0 = phi i32 [ %0, %entry ], [ %7, %bb ]
  %sum.0 = phi float [ 0.000000e+00, %entry ], [ %4, %bb ]
  %10 = icmp slt i32 %i.0, %stop
  br i1 %10, label %bb, label %bb2

bb2:                                              ; preds = %bb1
  br label %return

return:                                           ; preds = %bb2
  ret float %sum.0
}

---

%5 = getelementptr float* %8, %8

is the bad IR.

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