Andrew Lenharth | e8aebf7 | 2005-05-04 15:56:34 +0000 | [diff] [blame] | 1 | ; Make sure this testcase codegens to the ctpop instruction |
Reid Spencer | 65f47a3 | 2007-04-15 18:40:57 +0000 | [diff] [blame^] | 2 | ; 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 | \ |
| 10 | ; RUN: not grep -i 'ctpop' |
Andrew Lenharth | 1419711 | 2005-05-04 15:20:16 +0000 | [diff] [blame] | 11 | |
| 12 | declare long %llvm.ctpop(long) |
| 13 | |
| 14 | implementation ; Functions: |
| 15 | |
| 16 | long %bar(long %x) { |
| 17 | entry: |
| 18 | %tmp.1 = call long %llvm.ctpop( long %x ) |
| 19 | ret long %tmp.1 |
| 20 | } |