Fix a README item: when doing a comparison with the result
[oota-llvm.git] / test / Transforms / ConstProp / bswap.ll
index 2d7f96449faed246be5379d45219607d101a53f0..9fce309b7887f21f99fdb6a9571715fbc23507a8 100644 (file)
@@ -1,22 +1,25 @@
 ; bswap should be constant folded when it is passed a constant argument
 
-; RUN: llvm-as < %s | opt -constprop | llvm-dis | not grep call
+; RUN: opt < %s -constprop -S | not grep call
 
-declare ushort %llvm.bswap.i16(ushort)
-declare uint %llvm.bswap.i32(uint)
-declare ulong %llvm.bswap.i64(ulong)
+declare i16 @llvm.bswap.i16(i16)
 
-ushort %W() {
-       %Z = call ushort %llvm.bswap.i16(ushort 1)
-       ret ushort %Z
+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
 }
 
-uint %X() {
-       %Z = call uint %llvm.bswap.i32(uint 1)
-       ret uint %Z
+define i32 @X() {
+        %Z = call i32 @llvm.bswap.i32( i32 1 )          ; <i32> [#uses=1]
+        ret i32 %Z
 }
 
-ulong %Y() {
-       %Z = call ulong %llvm.bswap.i64(ulong 1)
-       ret ulong %Z
+define i64 @Y() {
+        %Z = call i64 @llvm.bswap.i64( i64 1 )          ; <i64> [#uses=1]
+        ret i64 %Z
 }
+