1 ; bswap should be constant folded when it is passed a constant argument
3 ; RUN: llvm-as < %s | llc -march=x86 | \
4 ; RUN: grep bswapl | count 3
5 ; RUN: llvm-as < %s | llc -march=x86 | grep rolw | count 1
7 declare i16 @llvm.bswap.i16(i16)
9 declare i32 @llvm.bswap.i32(i32)
11 declare i64 @llvm.bswap.i64(i64)
13 define i16 @W(i16 %A) {
14 %Z = call i16 @llvm.bswap.i16( i16 %A ) ; <i16> [#uses=1]
18 define i32 @X(i32 %A) {
19 %Z = call i32 @llvm.bswap.i32( i32 %A ) ; <i32> [#uses=1]
23 define i64 @Y(i64 %A) {
24 %Z = call i64 @llvm.bswap.i64( i64 %A ) ; <i64> [#uses=1]