Use InstrSlots::NUM rather than pre-dividing by four. Also, mark this const.
[oota-llvm.git] / test / Analysis / LoadVN / casts.ll
index 3749bee3663a78550d7f1659c23475765bca5f76..70e3fe56805c7a8c17b7d202c50af68ffb86a757 100644 (file)
@@ -1,13 +1,13 @@
 ; Check to make sure that Value Numbering doesn't merge casts of different
 ; flavors.
-; RUN: llvm-upgrade < %s | llvm-as | opt -load-vn -gcse | llvm-dis | \
+; RUN: llvm-as < %s | opt -load-vn -gcse | llvm-dis | \
 ; RUN:   grep {\[sz\]ext} | count 2
 
-declare void %external(int)
+declare void @external(i32)
 
-int %test_casts(short %x) {
-  %a = sext short %x to int
-  %b = zext short %x to int
-  call void %external(int %a)
-  ret int %b
+define i32 @test_casts(i16 %x) {
+       %a = sext i16 %x to i32         ; <i32> [#uses=1]
+       %b = zext i16 %x to i32         ; <i32> [#uses=1]
+       call void @external( i32 %a )
+       ret i32 %b
 }