llvm.org GIT mirror llvm / 9277e3b
Let llvm-upgrade upgrade the bswap intrinsic. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35569 91177308-0d34-0410-b5e6-96231b3b80d8 Reid Spencer 13 years ago
1 changed file(s) with 6 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
22 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep bswapl | wc -l | grep 3 &&
33 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep rolw | wc -l | grep 1
44
5 declare ushort %llvm.bswap.i16.i16(ushort)
6 declare uint %llvm.bswap.i32.i32(uint)
7 declare ulong %llvm.bswap.i64.i64(ulong)
5 declare ushort %llvm.bswap.i16(ushort)
6 declare uint %llvm.bswap.i32(uint)
7 declare ulong %llvm.bswap.i64(ulong)
88
99 ushort %W(ushort %A) {
10 %Z = call ushort %llvm.bswap.i16.i16(ushort %A)
10 %Z = call ushort %llvm.bswap.i16(ushort %A)
1111 ret ushort %Z
1212 }
1313
1414 uint %X(uint %A) {
15 %Z = call uint %llvm.bswap.i32.i32(uint %A)
15 %Z = call uint %llvm.bswap.i32(uint %A)
1616 ret uint %Z
1717 }
1818
1919 ulong %Y(ulong %A) {
20 %Z = call ulong %llvm.bswap.i64.i64(ulong %A)
20 %Z = call ulong %llvm.bswap.i64(ulong %A)
2121 ret ulong %Z
2222 }