1 ; bswap should be constant folded when it is passed a constant argument 2 3 ; RUN: opt < %s -constprop -S | not grep call 4 5 declare i16 @llvm.bswap.i16(i16) 6 7 declare i32 @llvm.bswap.i32(i32) 8 9 declare i64 @llvm.bswap.i64(i64) 10 11 define i16 @W() { 12 %Z = call i16 @llvm.bswap.i16( i16 1 ) ; <i16> [#uses=1] 13 ret i16 %Z 14 } 15 16 define i32 @X() { 17 %Z = call i32 @llvm.bswap.i32( i32 1 ) ; <i32> [#uses=1] 18 ret i32 %Z 19 } 20 21 define i64 @Y() { 22 %Z = call i64 @llvm.bswap.i64( i64 1 ) ; <i64> [#uses=1] 23 ret i64 %Z 24 } 25 26