blob: 6405224117b31730a8602af4e016ebaa7dc636c5 [file] [log] [blame]
Andrew Lenharthe8aebf72005-05-04 15:56:34 +00001; Make sure this testcase codegens to the ctpop instruction
Reid Spencer65f47a32007-04-15 18:40:57 +00002; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha -mcpu=ev67 | grep -i ctpop
3; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha -mattr=+CIX | \
4; RUN: grep -i ctpop
5; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha -mcpu=ev6 | \
6; RUN: not grep -i ctpop
7; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha -mcpu=ev56 | \
8; RUN: not grep -i ctpop
9; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha -mattr=-CIX | \
Reid Spencer43b40032007-04-16 15:31:49 +000010; RUN: not grep -i ctpop
Reid Spencer4575ab22007-04-15 23:00:46 +000011; XFAIL: *
Andrew Lenharth14197112005-05-04 15:20:16 +000012
Reid Spencera529f6f2007-04-16 03:18:25 +000013declare long %llvm.ctpop.i64(long)
Andrew Lenharth14197112005-05-04 15:20:16 +000014
15implementation ; Functions:
16
17long %bar(long %x) {
18entry:
Reid Spencera529f6f2007-04-16 03:18:25 +000019 %tmp.1 = call long %llvm.ctpop.i64( long %x )
Andrew Lenharth14197112005-05-04 15:20:16 +000020 ret long %tmp.1
21}