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