Mercurial > hg > Members > tobaru > cbc > CbC_llvm
comparison test/CodeGen/PowerPC/vec_cmp.ll @ 120:1172e4bd9c6f
update 4.0.0
author | mir3636 |
---|---|
date | Fri, 25 Nov 2016 19:14:25 +0900 |
parents | 54457678186b |
children | 803732b1fca8 |
comparison
equal
deleted
inserted
replaced
101:34baf5011add | 120:1172e4bd9c6f |
---|---|
1 ; RUN: llc -mcpu=pwr6 -mattr=+altivec < %s | FileCheck %s | 1 ; RUN: llc -verify-machineinstrs -mcpu=pwr6 -mattr=+altivec < %s | FileCheck %s |
2 | 2 |
3 ; Check vector comparisons using altivec. For non-native types, just basic | 3 ; Check vector comparisons using altivec. For non-native types, just basic |
4 ; comparison instruction check is done. For altivec supported type (16i8, | 4 ; comparison instruction check is done. For altivec supported type (16i8, |
5 ; 8i16, 4i32, and 4f32) all the comparisons operators (==, !=, >, >=, <, <=) | 5 ; 8i16, 4i32, and 4f32) all the comparisons operators (==, !=, >, >=, <, <=) |
6 ; are checked. | 6 ; are checked. |
22 %cmp = icmp eq <4 x i8> %x, %y | 22 %cmp = icmp eq <4 x i8> %x, %y |
23 %sext = sext <4 x i1> %cmp to <4 x i8> | 23 %sext = sext <4 x i1> %cmp to <4 x i8> |
24 ret <4 x i8> %sext | 24 ret <4 x i8> %sext |
25 } | 25 } |
26 ; CHECK-LABEL: v4si8_cmp: | 26 ; CHECK-LABEL: v4si8_cmp: |
27 ; CHECK: vcmpequw {{[0-9]+}}, {{[0-9]+}}, {{[0-9]+}} | 27 ; CHECK: vcmpequb {{[0-9]+}}, {{[0-9]+}}, {{[0-9]+}} |
28 | 28 |
29 | 29 |
30 define <8 x i8> @v8si8_cmp(<8 x i8> %x, <8 x i8> %y) nounwind readnone { | 30 define <8 x i8> @v8si8_cmp(<8 x i8> %x, <8 x i8> %y) nounwind readnone { |
31 %cmp = icmp eq <8 x i8> %x, %y | 31 %cmp = icmp eq <8 x i8> %x, %y |
32 %sext = sext <8 x i1> %cmp to <8 x i8> | 32 %sext = sext <8 x i1> %cmp to <8 x i8> |
33 ret <8 x i8> %sext | 33 ret <8 x i8> %sext |
34 } | 34 } |
35 ; CHECK-LABEL: v8si8_cmp: | 35 ; CHECK-LABEL: v8si8_cmp: |
36 ; CHECK: vcmpequh {{[0-9]+}}, {{[0-9]+}}, {{[0-9]+}} | 36 ; CHECK: vcmpequb {{[0-9]+}}, {{[0-9]+}}, {{[0-9]+}} |
37 | 37 |
38 | 38 |
39 ; Additional tests for v16i8 since it is a altivec native type | 39 ; Additional tests for v16i8 since it is a altivec native type |
40 | 40 |
41 define <16 x i8> @v16si8_cmp_eq(<16 x i8> %x, <16 x i8> %y) nounwind readnone { | 41 define <16 x i8> @v16si8_cmp_eq(<16 x i8> %x, <16 x i8> %y) nounwind readnone { |
156 %cmp = icmp eq <4 x i16> %x, %y | 156 %cmp = icmp eq <4 x i16> %x, %y |
157 %sext = sext <4 x i1> %cmp to <4 x i16> | 157 %sext = sext <4 x i1> %cmp to <4 x i16> |
158 ret <4 x i16> %sext | 158 ret <4 x i16> %sext |
159 } | 159 } |
160 ; CHECK-LABEL: v4si16_cmp: | 160 ; CHECK-LABEL: v4si16_cmp: |
161 ; CHECK: vcmpequw {{[0-9]+}}, {{[0-9]+}}, {{[0-9]+}} | 161 ; CHECK: vcmpequh {{[0-9]+}}, {{[0-9]+}}, {{[0-9]+}} |
162 | 162 |
163 | 163 |
164 ; Additional tests for v8i16 since it is an altivec native type | 164 ; Additional tests for v8i16 since it is an altivec native type |
165 | 165 |
166 define <8 x i16> @v8si16_cmp_eq(<8 x i16> %x, <8 x i16> %y) nounwind readnone { | 166 define <8 x i16> @v8si16_cmp_eq(<8 x i16> %x, <8 x i16> %y) nounwind readnone { |