[LLVMbugs] [Bug 6096] New: opt assertion failed when constant folding vector-compare with undef-value

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Wed Jan 20 13:15:27 PST 2010


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

           Summary: opt assertion failed when constant folding vector-
                    compare with undef-value
           Product: new-bugs
           Version: unspecified
          Platform: Sun
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: bixia.zheng at amd.com
                CC: llvmbugs at cs.uiuc.edu


The problem can be reproduced with TOT LLVM

command line:
=============
    llvm-as c.ll -o c.bc
    opt -O3 c.bc -o t.bc -debug

Error message:
==============
INSTCOMBINE ITERATION #0 on hello
IC: ConstFold to: <4 x float> fdiv (<4 x float> undef, <4 x float> <float
1.000000e+000, float 1.000000e+000, float 1.000000e+000, float 1.000000e+000>)
from:
 %div = fdiv <4 x float> undef, <float 1.000000e+000, float 1.000000e+000,
float1.000000e+000, float 1.000000e+000> ; <<4 x float>> [#uses=1]

Assertion failed: begin() + idx < end(), file
\llvm\include\llvm/ADT/SmallVector.h, line 152

Test case:
==========
; ModuleID = 'c.bc'
target datalayout =
"e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32"
target triple = "i686-pc-win32"

define void @hello() nounwind {
entry:
  %a = alloca <4 x float>, align 16               ; <<4 x float>*> [#uses=0]
  %b = alloca <4 x float>, align 16               ; <<4 x float>*> [#uses=1]
  %c = alloca <4 x float>, align 16               ; <<4 x float>*> [#uses=2]
  %zero4 = alloca <4 x float>, align 16           ; <<4 x float>*> [#uses=2]
  %i4 = alloca <4 x i32>, align 16                ; <<4 x i32>*> [#uses=1]
  store <4 x float> <float 1.000000e+000, float 1.000000e+000, float
1.000000e+000, float 1.000000e+000>, <4 x float>* %c
  store <4 x float> zeroinitializer, <4 x float>* %zero4
  %tmp = load <4 x float>* %b                     ; <<4 x float>> [#uses=1]
  %tmp1 = load <4 x float>* %c                    ; <<4 x float>> [#uses=1]
  %div = fdiv <4 x float> %tmp, %tmp1             ; <<4 x float>> [#uses=1]
  %tmp2 = load <4 x float>* %zero4                ; <<4 x float>> [#uses=1]
  %cmp = fcmp ole <4 x float> %div, %tmp2         ; <<4 x i1>> [#uses=1]
  %sext = sext <4 x i1> %cmp to <4 x i32>         ; <<4 x i32>> [#uses=1]
  store <4 x i32> %sext, <4 x i32>* %i4
  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.



More information about the llvm-bugs mailing list