OLD | NEW |
1 //===- subzero/crosstest/test_select_main.cpp - Driver for tests ----------===// | 1 //===- subzero/crosstest/test_select_main.cpp - Driver for tests ----------===// |
2 // | 2 // |
3 // The Subzero Code Generator | 3 // The Subzero Code Generator |
4 // | 4 // |
5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
7 // | 7 // |
8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
9 // | 9 // |
10 // Driver for crosstesting the select bitcode instruction | 10 // Driver for crosstesting the select bitcode instruction |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 std::cout << "select<" << Vectors<T>::TypeName << ">(Cond="; | 125 std::cout << "select<" << Vectors<T>::TypeName << ">(Cond="; |
126 std::cout << vectAsString<T>(Cond) | 126 std::cout << vectAsString<T>(Cond) |
127 << ", Value1=" << vectAsString<T>(Value1) | 127 << ", Value1=" << vectAsString<T>(Value1) |
128 << ", Value2=" << vectAsString<T>(Value2) << ")\n"; | 128 << ", Value2=" << vectAsString<T>(Value2) << ")\n"; |
129 std::cout << "llc=" << vectAsString<T>(ResultLlc) << "\n"; | 129 std::cout << "llc=" << vectAsString<T>(ResultLlc) << "\n"; |
130 std::cout << "sz =" << vectAsString<T>(ResultSz) << "\n"; | 130 std::cout << "sz =" << vectAsString<T>(ResultSz) << "\n"; |
131 } | 131 } |
132 } | 132 } |
133 } | 133 } |
134 | 134 |
135 #ifdef X8664_STACK_HACK | |
136 extern "C" int wrapped_main(int argc, char *argv[]) { | |
137 #else // !defined(X8664_STACK_HACK) | |
138 int main(int argc, char *argv[]) { | 135 int main(int argc, char *argv[]) { |
139 #endif // X8664_STACK_HACK | |
140 size_t TotalTests = 0; | 136 size_t TotalTests = 0; |
141 size_t Passes = 0; | 137 size_t Passes = 0; |
142 size_t Failures = 0; | 138 size_t Failures = 0; |
143 | 139 |
144 testSelect<v4f32, v4i1>(TotalTests, Passes, Failures); | 140 testSelect<v4f32, v4i1>(TotalTests, Passes, Failures); |
145 testSelect<v4si32, v4i1>(TotalTests, Passes, Failures); | 141 testSelect<v4si32, v4i1>(TotalTests, Passes, Failures); |
146 testSelect<v4ui32, v4i1>(TotalTests, Passes, Failures); | 142 testSelect<v4ui32, v4i1>(TotalTests, Passes, Failures); |
147 testSelect<v8si16, v8i1>(TotalTests, Passes, Failures); | 143 testSelect<v8si16, v8i1>(TotalTests, Passes, Failures); |
148 testSelect<v8ui16, v8i1>(TotalTests, Passes, Failures); | 144 testSelect<v8ui16, v8i1>(TotalTests, Passes, Failures); |
149 testSelect<v16si8, v16i1>(TotalTests, Passes, Failures); | 145 testSelect<v16si8, v16i1>(TotalTests, Passes, Failures); |
150 testSelect<v16ui8, v16i1>(TotalTests, Passes, Failures); | 146 testSelect<v16ui8, v16i1>(TotalTests, Passes, Failures); |
151 testSelectI1<v4i1>(TotalTests, Passes, Failures); | 147 testSelectI1<v4i1>(TotalTests, Passes, Failures); |
152 testSelectI1<v8i1>(TotalTests, Passes, Failures); | 148 testSelectI1<v8i1>(TotalTests, Passes, Failures); |
153 testSelectI1<v16i1>(TotalTests, Passes, Failures); | 149 testSelectI1<v16i1>(TotalTests, Passes, Failures); |
154 | 150 |
155 std::cout << "TotalTests=" << TotalTests << " Passes=" << Passes | 151 std::cout << "TotalTests=" << TotalTests << " Passes=" << Passes |
156 << " Failures=" << Failures << "\n"; | 152 << " Failures=" << Failures << "\n"; |
157 | 153 |
158 return Failures; | 154 return Failures; |
159 } | 155 } |
OLD | NEW |