Home | History | Annotate | Download | only in AArch64
      1 ; RUN: llc < %s -mtriple=arm64-apple-ios -mcpu=cyclone | FileCheck %s
      2 
      3 ; The non-byte ones used to fail with "Cannot select"
      4 
      5 ; CHECK-LABEL: ctpopv8i8
      6 ; CHECK: cnt.8b
      7 define <8 x i8> @ctpopv8i8(<8 x i8> %x) nounwind readnone {
      8   %cnt = tail call <8 x i8> @llvm.ctpop.v8i8(<8 x i8> %x)
      9   ret <8 x i8> %cnt
     10 }
     11 
     12 declare <8 x i8> @llvm.ctpop.v8i8(<8 x i8>) nounwind readnone
     13 
     14 ; CHECK-LABEL: ctpopv4i16
     15 ; CHECK: cnt.8b
     16 define <4 x i16> @ctpopv4i16(<4 x i16> %x) nounwind readnone {
     17   %cnt = tail call <4 x i16> @llvm.ctpop.v4i16(<4 x i16> %x)
     18   ret <4 x i16> %cnt
     19 }
     20 
     21 declare <4 x i16> @llvm.ctpop.v4i16(<4 x i16>) nounwind readnone
     22 
     23 ; CHECK-LABEL: ctpopv2i32
     24 ; CHECK: cnt.8b
     25 define <2 x i32> @ctpopv2i32(<2 x i32> %x) nounwind readnone {
     26   %cnt = tail call <2 x i32> @llvm.ctpop.v2i32(<2 x i32> %x)
     27   ret <2 x i32> %cnt
     28 }
     29 
     30 declare <2 x i32> @llvm.ctpop.v2i32(<2 x i32>) nounwind readnone
     31 
     32 
     33 ; CHECK-LABEL: ctpopv16i8
     34 ; CHECK: cnt.16b
     35 define <16 x i8> @ctpopv16i8(<16 x i8> %x) nounwind readnone {
     36   %cnt = tail call <16 x i8> @llvm.ctpop.v16i8(<16 x i8> %x)
     37   ret <16 x i8> %cnt
     38 }
     39 
     40 declare <16 x i8> @llvm.ctpop.v16i8(<16 x i8>) nounwind readnone
     41 
     42 ; CHECK-LABEL: ctpopv8i16
     43 ; CHECK: cnt.8b
     44 define <8 x i16> @ctpopv8i16(<8 x i16> %x) nounwind readnone {
     45   %cnt = tail call <8 x i16> @llvm.ctpop.v8i16(<8 x i16> %x)
     46   ret <8 x i16> %cnt
     47 }
     48 
     49 declare <8 x i16> @llvm.ctpop.v8i16(<8 x i16>) nounwind readnone
     50 
     51 ; CHECK-LABEL: ctpopv4i32
     52 ; CHECK: cnt.8b
     53 define <4 x i32> @ctpopv4i32(<4 x i32> %x) nounwind readnone {
     54   %cnt = tail call <4 x i32> @llvm.ctpop.v4i32(<4 x i32> %x)
     55   ret <4 x i32> %cnt
     56 }
     57 
     58 declare <4 x i32> @llvm.ctpop.v4i32(<4 x i32>) nounwind readnone
     59 
     60 ; CHECK-LABEL: ctpopv2i64
     61 ; CHECK: cnt.8b
     62 define <2 x i64> @ctpopv2i64(<2 x i64> %x) nounwind readnone {
     63   %cnt = tail call <2 x i64> @llvm.ctpop.v2i64(<2 x i64> %x)
     64   ret <2 x i64> %cnt
     65 }
     66 
     67 declare <2 x i64> @llvm.ctpop.v2i64(<2 x i64>) nounwind readnone
     68