48 lines · plain
1; RUN: llc -O1 -mtriple=mips64 -mcpu=octeon < %s | FileCheck %s -check-prefix=OCTEON2; RUN: llc -O1 -mtriple=mips64 -mcpu=mips64 < %s | FileCheck %s -check-prefix=MIPS643 4define i8 @cnt8(i8 %x) nounwind readnone {5 %cnt = tail call i8 @llvm.ctpop.i8(i8 %x)6 ret i8 %cnt7; OCTEON-LABEL: cnt8:8; OCTEON: jr $ra9; OCTEON: pop $2, [[R1:\$[0-9]+]]10; MIPS64-LABEL: cnt8:11; MIPS64-NOT: pop12}13 14define i16 @cnt16(i16 %x) nounwind readnone {15 %cnt = tail call i16 @llvm.ctpop.i16(i16 %x)16 ret i16 %cnt17; OCTEON-LABEL: cnt16:18; OCTEON: jr $ra19; OCTEON: pop $2, [[R1:\$[0-9]+]]20; MIPS64-LABEL: cnt16:21; MIPS64-NOT: pop22}23 24define i32 @cnt32(i32 signext %x) nounwind readnone {25 %cnt = tail call i32 @llvm.ctpop.i32(i32 %x)26 ret i32 %cnt27; OCTEON-LABEL: cnt32:28; OCTEON: jr $ra29; OCTEON: pop $2, $430; MIPS64-LABEL: cnt32:31; MIPS64-NOT: pop32}33 34define i64 @cnt64(i64 %x) nounwind readnone {35 %cnt = tail call i64 @llvm.ctpop.i64(i64 %x)36 ret i64 %cnt37; OCTEON-LABEL: cnt64:38; OCTEON: jr $ra39; OCTEON: dpop $2, $440; MIPS64-LABEL: cnt64:41; MIPS64-NOT: dpop42}43 44declare i8 @llvm.ctpop.i8(i8) nounwind readnone45declare i16 @llvm.ctpop.i16(i16) nounwind readnone46declare i32 @llvm.ctpop.i32(i32) nounwind readnone47declare i64 @llvm.ctpop.i64(i64) nounwind readnone48