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