2005-05-04 23:56:34 +08:00
|
|
|
; Make sure this testcase codegens to the ctpop instruction
|
2007-04-16 02:40:57 +08:00
|
|
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha -mcpu=ev67 | grep -i ctpop
|
|
|
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha -mattr=+CIX | \
|
|
|
|
; RUN: grep -i ctpop
|
|
|
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha -mcpu=ev6 | \
|
|
|
|
; RUN: not grep -i ctpop
|
|
|
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha -mcpu=ev56 | \
|
|
|
|
; RUN: not grep -i ctpop
|
|
|
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha -mattr=-CIX | \
|
2007-04-16 23:31:49 +08:00
|
|
|
; RUN: not grep -i ctpop
|
2005-05-04 23:20:16 +08:00
|
|
|
|
2007-04-16 11:18:25 +08:00
|
|
|
declare long %llvm.ctpop.i64(long)
|
2005-05-04 23:20:16 +08:00
|
|
|
|
|
|
|
implementation ; Functions:
|
|
|
|
|
|
|
|
long %bar(long %x) {
|
|
|
|
entry:
|
2007-04-16 11:18:25 +08:00
|
|
|
%tmp.1 = call long %llvm.ctpop.i64( long %x )
|
2005-05-04 23:20:16 +08:00
|
|
|
ret long %tmp.1
|
|
|
|
}
|