1 ; bswap should be constant folded when it is passed a constant argument
3 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | \
4 ; RUN: grep bswapl | wc -l | grep 3
5 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep rolw | wc -l | grep 1
7 declare ushort %llvm.bswap.i16(ushort)
8 declare uint %llvm.bswap.i32(uint)
9 declare ulong %llvm.bswap.i64(ulong)
11 ushort %W(ushort %A) {
12 %Z = call ushort %llvm.bswap.i16(ushort %A)
17 %Z = call uint %llvm.bswap.i32(uint %A)
22 %Z = call ulong %llvm.bswap.i64(ulong %A)