1 ; RUN: opt < %s -instcombine | llvm-dis
3 ; This used to crash trying to do a double-to-pointer conversion
6 %retval = alloca i32, align 4 ; <i32*> [#uses=1]
7 "alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
8 %tmp = call i32 (...)* bitcast (i32 (i8*)* @f to i32 (...)*)( double 3.000000e+00 ) ; <i32> [#uses=0]
11 return: ; preds = %entry
12 %retval1 = load i32* %retval ; <i32> [#uses=1]
16 define i32 @f(i8* %p) {
18 %p_addr = alloca i8* ; <i8**> [#uses=1]
19 %retval = alloca i32, align 4 ; <i32*> [#uses=1]
20 "alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
21 store i8* %p, i8** %p_addr
24 return: ; preds = %entry
25 %retval1 = load i32* %retval ; <i32> [#uses=1]