fix rdar://9289583 - fast isel should handle non-canonical commutative binops
[oota-llvm.git] / test / Transforms / ConstProp / 2002-05-03-DivideByZeroException.ll
index 85bac18c11584ba0c48b48632b97787e1c20d749..15a6211893826ccbe134e613fcc9e180beff8a19 100644 (file)
@@ -1,14 +1,15 @@
 ; Make sure that the constant propogator doesn't divide by zero!
 ;
-; RUN: llvm-as < %s | opt -constprop
+; RUN: opt < %s -constprop
 ;
 
-int "test"() {
-       %R = div int 12, 0
-       ret int %R
+define i32 @test() {
+        %R = sdiv i32 12, 0             ; <i32> [#uses=1]
+        ret i32 %R
 }
 
-int "test2"() {
-       %R = rem int 12, 0
-       ret int %R
+define i32 @test2() {
+        %R = srem i32 12, 0             ; <i32> [#uses=1]
+        ret i32 %R
 }
+