blob: 2d7f96449faed246be5379d45219607d101a53f0 [file] [log] [blame]
Nate Begeman82049eb2006-01-14 01:25:24 +00001; bswap should be constant folded when it is passed a constant argument
2
3; RUN: llvm-as < %s | opt -constprop | llvm-dis | not grep call
4
5declare ushort %llvm.bswap.i16(ushort)
6declare uint %llvm.bswap.i32(uint)
7declare ulong %llvm.bswap.i64(ulong)
8
9ushort %W() {
10 %Z = call ushort %llvm.bswap.i16(ushort 1)
11 ret ushort %Z
12}
13
14uint %X() {
15 %Z = call uint %llvm.bswap.i32(uint 1)
16 ret uint %Z
17}
18
19ulong %Y() {
20 %Z = call ulong %llvm.bswap.i64(ulong 1)
21 ret ulong %Z
22}