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

            Bug ID: 20114
           Summary: opt fails with -instcombine optimization, Linux,
                    trunk, regresssion from version 3.4
           Product: tools
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: opt
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

We can make small reproducer:

; Function Attrs: nounwind readnone
define <4 x float> @foo(<4 x float> %a) {
allocas:
  %mul__a_load = fmul <4 x float> %a, <float 2.000000e+00, float 2.000000e+00,
float 2.000000e+00, float 2.000000e+00>
  ret <4 x float> %mul__a_load
}

; Function Attrs: nounwind
define void @function_(<4 x i32> %__mask, <4 x i32>* %A) {
allocas:
  %mask01.i = shufflevector <4 x i32> %__mask, <4 x i32> undef, <4 x i32> <i32
0, i32 0, i32 1, i32 1>
  %masked_new.i.i.i = and <4 x i32> bitcast (<2 x i64> <i64 ptrtoint (<4 x
float> (<4 x float>)* @foo to i64), i64 ptrtoint (<4 x float> (<4 x float>)*
@foo to i64)> to <4 x i32>), %mask01.i
  store <4 x i32> %masked_new.i.i.i, <4 x i32>* %A
  ret void
}

and command "opt reproducer.ll -instcombine > l.bc" (opt from trunk)
will have an error:
opt: include/llvm/Support/Casting.h:95: static bool
llvm::isa_impl_cl<llvm::UndefValue, const llvm::Constant *>::doit(const From *)
[To = llvm::UndefValue, From = const llvm::Constant *]: Assertion `Val &&
"isa<> used on a null pointer"' failed.

In version 3.4 everything is ok.

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