Home | History | Annotate | Download | only in InstCombine
      1 ; RUN: opt < %s -instcombine | llvm-dis
      2 
      3 ; This used to crash trying to do a double-to-pointer conversion
      4 define i32 @bar() {
      5 entry:
      6 	%retval = alloca i32, align 4		; <i32*> [#uses=1]
      7 	%tmp = call i32 (...)* bitcast (i32 (i8*)* @f to i32 (...)*)( double 3.000000e+00 )		; <i32> [#uses=0]
      8 	br label %return
      9 
     10 return:		; preds = %entry
     11 	%retval1 = load i32* %retval		; <i32> [#uses=1]
     12 	ret i32 %retval1
     13 }
     14 
     15 define i32 @f(i8* %p) {
     16 entry:
     17 	%p_addr = alloca i8*		; <i8**> [#uses=1]
     18 	%retval = alloca i32, align 4		; <i32*> [#uses=1]
     19 	store i8* %p, i8** %p_addr
     20 	br label %return
     21 
     22 return:		; preds = %entry
     23 	%retval1 = load i32* %retval		; <i32> [#uses=1]
     24 	ret i32 %retval1
     25 }
     26