1 ; RUN: llc -O1 -march=mips64 -mcpu=octeon < %s | FileCheck %s -check-prefix=OCTEON
2 ; RUN: llc -O1 -march=mips64 -mcpu=mips64 < %s | FileCheck %s -check-prefix=MIPS64
4 define i8 @cnt8(i8 %x) nounwind readnone {
5 %cnt = tail call i8 @llvm.ctpop.i8(i8 %x)
9 ; OCTEON: pop $2, [[R1:\$[0-9]+]]
14 define i16 @cnt16(i16 %x) nounwind readnone {
15 %cnt = tail call i16 @llvm.ctpop.i16(i16 %x)
17 ; OCTEON-LABEL: cnt16:
19 ; OCTEON: pop $2, [[R1:\$[0-9]+]]
20 ; MIPS64-LABEL: cnt16:
24 define i32 @cnt32(i32 signext %x) nounwind readnone {
25 %cnt = tail call i32 @llvm.ctpop.i32(i32 %x)
27 ; OCTEON-LABEL: cnt32:
30 ; MIPS64-LABEL: cnt32:
34 define i64 @cnt64(i64 %x) nounwind readnone {
35 %cnt = tail call i64 @llvm.ctpop.i64(i64 %x)
37 ; OCTEON-LABEL: cnt64:
40 ; MIPS64-LABEL: cnt64:
44 declare i8 @llvm.ctpop.i8(i8) nounwind readnone
45 declare i16 @llvm.ctpop.i16(i16) nounwind readnone
46 declare i32 @llvm.ctpop.i32(i32) nounwind readnone
47 declare i64 @llvm.ctpop.i64(i64) nounwind readnone