2005-05-04 15:56:34 +00:00
|
|
|
; Make sure this testcase codegens to the ctpop instruction
|
2007-04-15 18:40:57 +00: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 15:31:49 +00:00
|
|
|
; RUN: not grep -i ctpop
|
2005-05-04 15:20:16 +00:00
|
|
|
|
2007-04-16 03:18:25 +00:00
|
|
|
declare long %llvm.ctpop.i64(long)
|
2005-05-04 15:20:16 +00:00
|
|
|
|
|
|
|
implementation ; Functions:
|
|
|
|
|
|
|
|
long %bar(long %x) {
|
|
|
|
entry:
|
2007-04-16 03:18:25 +00:00
|
|
|
%tmp.1 = call long %llvm.ctpop.i64( long %x )
|
2005-05-04 15:20:16 +00:00
|
|
|
ret long %tmp.1
|
|
|
|
}
|