FileCheck-ize a test, and tidy it up a touch.
[oota-llvm.git] / test / Transforms / Reassociate / subtest.ll
index 38a887b56625fc7db02e3465923dd651fbb44a18..4c63d1238a6741583e49bee9edf40a36200d9470 100644 (file)
@@ -1,10 +1,11 @@
 ; With sub reassociation, constant folding can eliminate the 12 and -12 constants.
 ;
-; RUN: as < %s | opt -reassociate -constprop -instcombine -die | dis | not grep 12
+; RUN: opt < %s -reassociate -instcombine -S | not grep 12
 
-int "test"(int %A, int %B) {
-       %X = add int -12, %A
-       %Y = sub int %X, %B
-       %Z = add int %Y, 12
-       ret int %Z
+define i32 @test(i32 %A, i32 %B) {
+       %X = add i32 -12, %A            ; <i32> [#uses=1]
+       %Y = sub i32 %X, %B             ; <i32> [#uses=1]
+       %Z = add i32 %Y, 12             ; <i32> [#uses=1]
+       ret i32 %Z
 }
+