Mercurial > hg > Members > tobaru > cbc > CbC_llvm
comparison test/CodeGen/AArch64/arm64-neon-select_cc.ll @ 95:afa8332a0e37
LLVM 3.8
author | Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 13 Oct 2015 17:48:58 +0900 |
parents | 60c9769439b8 |
children |
comparison
equal
deleted
inserted
replaced
84:f3e34b893a5f | 95:afa8332a0e37 |
---|---|
1 ; RUN: llc < %s -verify-machineinstrs -mtriple=arm64-none-linux-gnu -mattr=+neon -fp-contract=fast | FileCheck %s | 1 ; RUN: llc -mtriple=arm64-none-linux-gnu -mattr=+neon -fp-contract=fast \ |
2 ; RUN: < %s -verify-machineinstrs -asm-verbose=false | FileCheck %s | |
2 | 3 |
3 define <8x i8> @test_select_cc_v8i8_i8(i8 %a, i8 %b, <8x i8> %c, <8x i8> %d ) { | 4 define <8x i8> @test_select_cc_v8i8_i8(i8 %a, i8 %b, <8x i8> %c, <8x i8> %d ) { |
4 ; CHECK-LABEL: test_select_cc_v8i8_i8: | 5 ; CHECK-LABEL: test_select_cc_v8i8_i8: |
5 ; CHECK-DAG: fmov s[[LHS:[0-9]+]], w0 | 6 ; CHECK-DAG: fmov s[[LHS:[0-9]+]], w0 |
6 ; CHECK-DAG: fmov s[[RHS:[0-9]+]], w1 | 7 ; CHECK-DAG: fmov s[[RHS:[0-9]+]], w1 |
217 ; CHECK: mov v0.16b, [[DUPMASK]].16b | 218 ; CHECK: mov v0.16b, [[DUPMASK]].16b |
218 %cmp = icmp ne i1 %cc, 0 | 219 %cmp = icmp ne i1 %cc, 0 |
219 %e = select i1 %cmp, <2 x i32> %a, <2 x i32> %b | 220 %e = select i1 %cmp, <2 x i32> %a, <2 x i32> %b |
220 ret <2 x i32> %e | 221 ret <2 x i32> %e |
221 } | 222 } |
223 | |
224 ; Also make sure we support irregular/non-power-of-2 types such as v3f32. | |
225 define <3 x float> @test_select_cc_v3f32_fcmp_f32(<3 x float> %a, <3 x float> %b, float %c1, float %c2) #0 { | |
226 ; CHECK-LABEL: test_select_cc_v3f32_fcmp_f32: | |
227 ; CHECK-NEXT: fcmeq [[MASK:v[0-9]+]].4s, v2.4s, v3.4s | |
228 ; CHECK-NEXT: dup [[DUPMASK:v[0-9]+]].4s, [[MASK]].s[0] | |
229 ; CHECK-NEXT: bsl [[DUPMASK:v[0-9]+]].16b, v0.16b, v1.16b | |
230 ; CHECK-NEXT: mov v0.16b, [[DUPMASK]].16b | |
231 ; CHECK-NEXT: ret | |
232 %cc = fcmp oeq float %c1, %c2 | |
233 %r = select i1 %cc, <3 x float> %a, <3 x float> %b | |
234 ret <3 x float> %r | |
235 } | |
236 | |
237 define <3 x float> @test_select_cc_v3f32_fcmp_f64(<3 x float> %a, <3 x float> %b, double %c1, double %c2) #0 { | |
238 ; CHECK-LABEL: test_select_cc_v3f32_fcmp_f64: | |
239 ; CHECK-NEXT: fcmeq [[MASK:v[0-9]+]].2d, v2.2d, v3.2d | |
240 ; CHECK-NEXT: dup [[DUPMASK:v[0-9]+]].2d, [[MASK]].d[0] | |
241 ; CHECK-NEXT: bsl [[DUPMASK:v[0-9]+]].16b, v0.16b, v1.16b | |
242 ; CHECK-NEXT: mov v0.16b, [[DUPMASK]].16b | |
243 ; CHECK-NEXT: ret | |
244 %cc = fcmp oeq double %c1, %c2 | |
245 %r = select i1 %cc, <3 x float> %a, <3 x float> %b | |
246 ret <3 x float> %r | |
247 } | |
248 | |
249 attributes #0 = { nounwind} |