; NOTE: Assertions have been autogenerated by utils/update_llubi_test_checks.py UTC_ARGS: --version 6 ; RUN: llubi --verbose < %s 2>&1 | FileCheck %s target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64" define void @main() { entry: %bitcast_int2int = bitcast i32 1 to i32 %bitcast_int2int_poison = bitcast i32 poison to i32 %bitcast_int2float1 = bitcast i32 0 to float %bitcast_int2float2 = bitcast i32 5033160 to float %bitcast_float2float1 = bitcast float 2.0 to float %bitcast_float2float2 = bitcast float 0x3FA9999900000000 to float %bitcast_float2int = bitcast float 2.0 to i32 %bitcast_half2bf16 = bitcast half 1.0 to bfloat %ptr = alloca i32 %bitcast_ptr2ptr = bitcast ptr %ptr to ptr %bitcast_vec2scalar1 = bitcast <2 x i32> to i64 %bitcast_vec2scalar2 = bitcast <4 x i4> to i16 %bitcast_scalar2vec1 = bitcast i64 1 to <2 x i32> %bitcast_scalar2vec2 = bitcast i16 32768 to <16 x i1> %bitcast_vec2scalar_partial_poison = bitcast <2 x i32> to i64 %bitcast_scalar2vec_poison = bitcast i64 poison to <2 x i32> %bitcast_vec2vec_up = bitcast <2 x i32> to <4 x i16> %bitcast_vec2vec_down1 = bitcast <4 x i16> to <2 x i32> %bitcast_vec2vec_down2 = bitcast <4 x i32> to <2 x i64> %bitcast_vec2vec_weird = bitcast <8 x i3> to <3 x i8> %bitcast_intvec2floatvec = bitcast <2 x i32> to <4 x half> %bitcast_floatvec2int = bitcast <4 x half> to i64 ret void } ; CHECK: Entering function: main ; CHECK-NEXT: %bitcast_int2int = bitcast i32 1 to i32 => i32 1 ; CHECK-NEXT: %bitcast_int2int_poison = bitcast i32 poison to i32 => poison ; CHECK-NEXT: %bitcast_int2float1 = bitcast i32 0 to float => float 0.000000e+00 ; CHECK-NEXT: %bitcast_int2float2 = bitcast i32 5033160 to float => float 0x004CCCC8 ; CHECK-NEXT: %bitcast_float2float1 = bitcast float 2.000000e+00 to float => float 2.000000e+00 ; CHECK-NEXT: %bitcast_float2float2 = bitcast float f0x3D4CCCC8 to float => float 0x3D4CCCC8 ; CHECK-NEXT: %bitcast_float2int = bitcast float 2.000000e+00 to i32 => i32 1073741824 ; CHECK-NEXT: %bitcast_half2bf16 = bitcast half 1.000000e+00 to bfloat => bfloat 7.812500e-03 ; CHECK-NEXT: %ptr = alloca i32, align 4 => ptr 0x8 [ptr] ; CHECK-NEXT: %bitcast_ptr2ptr = bitcast ptr %ptr to ptr => ptr 0x8 [ptr] ; CHECK-NEXT: %bitcast_vec2scalar1 = bitcast <2 x i32> to i64 => i64 4294967296 ; CHECK-NEXT: %bitcast_vec2scalar2 = bitcast <4 x i4> to i16 => i16 21281 ; CHECK-NEXT: %bitcast_scalar2vec1 = bitcast i64 1 to <2 x i32> => { i32 1, i32 0 } ; CHECK-NEXT: %bitcast_scalar2vec2 = bitcast i16 -32768 to <16 x i1> => { F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T } ; CHECK-NEXT: %bitcast_vec2scalar_partial_poison = bitcast <2 x i32> to i64 => poison ; CHECK-NEXT: %bitcast_scalar2vec_poison = bitcast i64 poison to <2 x i32> => { poison, poison } ; CHECK-NEXT: %bitcast_vec2vec_up = bitcast <2 x i32> to <4 x i16> => { i16 1, i16 0, poison, poison } ; CHECK-NEXT: %bitcast_vec2vec_down1 = bitcast <4 x i16> to <2 x i32> => { poison, i32 196610 } ; CHECK-NEXT: %bitcast_vec2vec_down2 = bitcast <4 x i32> to <2 x i64> => { i64 4294967296, i64 12884901890 } ; CHECK-NEXT: %bitcast_vec2vec_weird = bitcast <8 x i3> to <3 x i8> => { i8 -120, i8 -58, i8 -6 } ; CHECK-NEXT: %bitcast_intvec2floatvec = bitcast <2 x i32> to <4 x half> => { half 5.960460e-08, half 0.000000e+00, half 1.192090e-07, half 0.000000e+00 } ; CHECK-NEXT: %bitcast_floatvec2int = bitcast <4 x half> to i64 => i64 4899988963420290048 ; CHECK-NEXT: ret void ; CHECK-NEXT: Exiting function: main