1 ; RUN: llc < %s -march=x86 -mattr=sse2 2 ; ModuleID = 'yyy.c' 3 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128" 4 target triple = "i686-apple-darwin8" 5 6 define <1 x i64> @a(<2 x i64> %__A) { 7 entry: 8 %__A_addr = alloca <2 x i64> ; <<2 x i64>*> [#uses=2] 9 %retval = alloca <1 x i64>, align 8 ; <<1 x i64>*> [#uses=3] 10 %"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0] 11 store <2 x i64> %__A, <2 x i64>* %__A_addr 12 %tmp = load <2 x i64>* %__A_addr, align 16 ; <<2 x i64>> [#uses=1] 13 %tmp1 = bitcast <2 x i64> %tmp to <2 x i64> ; <<2 x i64>> [#uses=1] 14 %tmp2 = extractelement <2 x i64> %tmp1, i32 0 ; <i64> [#uses=1] 15 %tmp3 = bitcast i64 %tmp2 to <1 x i64> ; <<1 x i64>> [#uses=1] 16 store <1 x i64> %tmp3, <1 x i64>* %retval, align 8 17 %tmp4 = load <1 x i64>* %retval, align 8 ; <<1 x i64>> [#uses=0] 18 br label %return 19 20 return: ; preds = %entry 21 %retval5 = load <1 x i64>* %retval ; <<1 x i64>> [#uses=1] 22 ret <1 x i64> %retval5 23 } 24 25 define <1 x i64> @b(<2 x i64> %__A) { 26 entry: 27 %__A_addr = alloca <2 x i64> ; <<2 x i64>*> [#uses=2] 28 %retval = alloca <1 x i64>, align 8 ; <<1 x i64>*> [#uses=3] 29 %"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0] 30 store <2 x i64> %__A, <2 x i64>* %__A_addr 31 %tmp = load <2 x i64>* %__A_addr, align 16 ; <<2 x i64>> [#uses=1] 32 %tmp1 = bitcast <2 x i64> %tmp to <2 x i64> ; <<2 x i64>> [#uses=1] 33 %tmp2 = extractelement <2 x i64> %tmp1, i32 1 ; <i64> [#uses=1] 34 %tmp3 = bitcast i64 %tmp2 to <1 x i64> ; <<1 x i64>> [#uses=1] 35 store <1 x i64> %tmp3, <1 x i64>* %retval, align 8 36 %tmp4 = load <1 x i64>* %retval, align 8 ; <<1 x i64>> [#uses=0] 37 br label %return 38 39 return: ; preds = %entry 40 %retval5 = load <1 x i64>* %retval ; <<1 x i64>> [#uses=1] 41 ret <1 x i64> %retval5 42 } 43 44 define i64 @c(<2 x i64> %__A) { 45 entry: 46 %__A_addr = alloca <2 x i64> ; <<2 x i64>*> [#uses=2] 47 %retval = alloca i64, align 8 ; <i64*> [#uses=2] 48 %tmp = alloca i64, align 8 ; <i64*> [#uses=2] 49 %"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0] 50 store <2 x i64> %__A, <2 x i64>* %__A_addr 51 %tmp1 = load <2 x i64>* %__A_addr, align 16 ; <<2 x i64>> [#uses=1] 52 %tmp2 = bitcast <2 x i64> %tmp1 to <2 x i64> ; <<2 x i64>> [#uses=1] 53 %tmp3 = extractelement <2 x i64> %tmp2, i32 0 ; <i64> [#uses=1] 54 store i64 %tmp3, i64* %tmp, align 8 55 %tmp4 = load i64* %tmp, align 8 ; <i64> [#uses=1] 56 store i64 %tmp4, i64* %retval, align 8 57 br label %return 58 59 return: ; preds = %entry 60 %retval5 = load i64* %retval ; <i64> [#uses=1] 61 ret i64 %retval5 62 } 63 64 define i64 @d(<2 x i64> %__A) { 65 entry: 66 %__A_addr = alloca <2 x i64> ; <<2 x i64>*> [#uses=2] 67 %retval = alloca i64, align 8 ; <i64*> [#uses=2] 68 %tmp = alloca i64, align 8 ; <i64*> [#uses=2] 69 %"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0] 70 store <2 x i64> %__A, <2 x i64>* %__A_addr 71 %tmp1 = load <2 x i64>* %__A_addr, align 16 ; <<2 x i64>> [#uses=1] 72 %tmp2 = bitcast <2 x i64> %tmp1 to <2 x i64> ; <<2 x i64>> [#uses=1] 73 %tmp3 = extractelement <2 x i64> %tmp2, i32 1 ; <i64> [#uses=1] 74 store i64 %tmp3, i64* %tmp, align 8 75 %tmp4 = load i64* %tmp, align 8 ; <i64> [#uses=1] 76 store i64 %tmp4, i64* %retval, align 8 77 br label %return 78 79 return: ; preds = %entry 80 %retval5 = load i64* %retval ; <i64> [#uses=1] 81 ret i64 %retval5 82 } 83