llvm.org GIT mirror llvm / 5d37acc
add some tests for typecasts and extract_element git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26998 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 14 years ago
1 changed file(s) with 23 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
9292 ret void
9393 }
9494
95 float %test_extract_elt(%f8 *%P) {
96 %p = load %f8* %P
97 %R = extractelement %f8 %p, uint 3
98 ret float %R
99 }
100
101 void %test_cast_1(<4 x float>* %b, <4 x int>* %a) {
102 %tmp = load <4 x float>* %b
103 %tmp2 = add <4 x float> %tmp,
104 %tmp3 = cast <4 x float> %tmp2 to <4 x int>
105 %tmp4 = add <4 x int> %tmp3,
106 store <4 x int> %tmp4, <4 x int>* %a
107 ret void
108 }
109
110 void %test_cast_2(<8 x float>* %a, <8 x int>* %b) {
111 %T = load <8 x float>* %a
112 %T2 = cast <8 x float> %T to <8 x int>
113 store <8 x int> %T2, <8 x int>* %b
114 ret void
115 }
116
117
95118 ;;; TEST IMPORTANT IDIOMS
96119
97120 void %splat(%f4* %P, %f4* %Q, float %X) {