Andrew Lenharth | eecbf30 | 2005-04-13 16:16:01 +0000 | [diff] [blame] | 1 | ; Make sure this testcase codegens the bsr instruction |
Tanya Lattner | 53a66d1 | 2008-02-19 01:41:04 +0000 | [diff] [blame^] | 2 | ; RUN: llvm-as < %s | llc -march=alpha | grep bsr |
Andrew Lenharth | eecbf30 | 2005-04-13 16:16:01 +0000 | [diff] [blame] | 3 | |
Tanya Lattner | 53a66d1 | 2008-02-19 01:41:04 +0000 | [diff] [blame^] | 4 | define internal i64 @abc(i32 %x) { |
| 5 | %tmp.2 = add i32 %x, -1 ; <i32> [#uses=1] |
| 6 | %tmp.0 = call i64 @abc( i32 %tmp.2 ) ; <i64> [#uses=1] |
| 7 | %tmp.5 = add i32 %x, -2 ; <i32> [#uses=1] |
| 8 | %tmp.3 = call i64 @abc( i32 %tmp.5 ) ; <i64> [#uses=1] |
| 9 | %tmp.6 = add i64 %tmp.0, %tmp.3 ; <i64> [#uses=1] |
| 10 | ret i64 %tmp.6 |
Andrew Lenharth | eecbf30 | 2005-04-13 16:16:01 +0000 | [diff] [blame] | 11 | } |
Tanya Lattner | 53a66d1 | 2008-02-19 01:41:04 +0000 | [diff] [blame^] | 12 | |