1 ; RUN: llc -verify-machineinstrs -mtriple=ppc64-- -mattr=+popcntd < %s | FileCheck %s
2 ; RUN: llc -verify-machineinstrs -mtriple=ppc64-- -mattr=+slow-popcntd < %s | FileCheck %s --check-prefix=SLOWPC
3 ; RUN: llc -verify-machineinstrs -mtriple=ppc64-- -mcpu=pwr7 < %s | FileCheck %s
4 ; RUN: llc -verify-machineinstrs -mtriple=ppc64-- -mcpu=a2q < %s | FileCheck %s --check-prefix=SLOWPC
5 ; RUN: llc -verify-machineinstrs -mtriple=ppc64-- -mcpu=a2q -mattr=+popcntd < %s | FileCheck %s
7 define i8 @cnt8(i8 %x) nounwind readnone {
8 %cnt = tail call i8 @llvm.ctpop.i8(i8 %x)
19 define i16 @cnt16(i16 %x) nounwind readnone {
20 %cnt = tail call i16 @llvm.ctpop.i16(i16 %x)
27 ; SLOWPC-LABEL: @cnt16
31 define i32 @cnt32(i32 %x) nounwind readnone {
32 %cnt = tail call i32 @llvm.ctpop.i32(i32 %x)
38 ; SLOWPC-LABEL: @cnt32
42 define i64 @cnt64(i64 %x) nounwind readnone {
43 %cnt = tail call i64 @llvm.ctpop.i64(i64 %x)
49 ; SLOWPC-LABEL: @cnt64
53 declare i8 @llvm.ctpop.i8(i8) nounwind readnone
54 declare i16 @llvm.ctpop.i16(i16) nounwind readnone
55 declare i32 @llvm.ctpop.i32(i32) nounwind readnone
56 declare i64 @llvm.ctpop.i64(i64) nounwind readnone