[MLIR] Replace std ops with arith dialect ops

Precursor: https://reviews.llvm.org/D110200

Removed redundant ops from the standard dialect that were moved to the
`arith` or `math` dialects.

Renamed all instances of operations in the codebase and in tests.

Reviewed By: rriddle, jpienaar

Differential Revision: https://reviews.llvm.org/D110797
diff --git a/mlir/test/Transforms/test-canonicalize.mlir b/mlir/test/Transforms/test-canonicalize.mlir
index 0ae10b0..c2137a3 100644
--- a/mlir/test/Transforms/test-canonicalize.mlir
+++ b/mlir/test/Transforms/test-canonicalize.mlir
@@ -39,10 +39,10 @@
 // CHECK-LABEL: func @test_commutative_multi
 // CHECK-SAME: (%[[ARG_0:[a-z0-9]*]]: i32, %[[ARG_1:[a-z0-9]*]]: i32)
 func @test_commutative_multi(%arg0: i32, %arg1: i32) -> (i32, i32) {
-  // CHECK-DAG: %[[C42:.*]] = constant 42 : i32
-  %c42_i32 = constant 42 : i32
-  // CHECK-DAG: %[[C43:.*]] = constant 43 : i32
-  %c43_i32 = constant 43 : i32
+  // CHECK-DAG: %[[C42:.*]] = arith.constant 42 : i32
+  %c42_i32 = arith.constant 42 : i32
+  // CHECK-DAG: %[[C43:.*]] = arith.constant 43 : i32
+  %c43_i32 = arith.constant 43 : i32
   // CHECK-NEXT: %[[O0:.*]] = "test.op_commutative"(%[[ARG_0]], %[[ARG_1]], %[[C42]], %[[C43]]) : (i32, i32, i32, i32) -> i32
   %y = "test.op_commutative"(%c42_i32, %arg0, %arg1, %c43_i32) : (i32, i32, i32, i32) -> i32
 
@@ -55,13 +55,13 @@
 
 // CHECK-LABEL: func @test_commutative_multi_cst
 func @test_commutative_multi_cst(%arg0: i32, %arg1: i32) -> (i32, i32) {
-  // CHECK-NEXT: %c42_i32 = constant 42 : i32
-  %c42_i32 = constant 42 : i32
-  %c42_i32_2 = constant 42 : i32
+  // CHECK-NEXT: %c42_i32 = arith.constant 42 : i32
+  %c42_i32 = arith.constant 42 : i32
+  %c42_i32_2 = arith.constant 42 : i32
   // CHECK-NEXT: %[[O0:.*]] = "test.op_commutative"(%arg0, %arg1, %c42_i32, %c42_i32) : (i32, i32, i32, i32) -> i32
   %y = "test.op_commutative"(%c42_i32, %arg0, %arg1, %c42_i32_2) : (i32, i32, i32, i32) -> i32
 
-  %c42_i32_3 = constant 42 : i32
+  %c42_i32_3 = arith.constant 42 : i32
 
   // CHECK-NEXT: %[[O1:.*]] = "test.op_commutative"(%arg0, %arg1, %c42_i32, %c42_i32) : (i32, i32, i32, i32) -> i32
   %z = "test.op_commutative"(%arg0, %c42_i32_3, %c42_i32_2, %arg1): (i32, i32, i32, i32) -> i32
@@ -72,7 +72,7 @@
 // CHECK-LABEL: func @typemismatch
 
 func @typemismatch() -> i32 {
-  %c42 = constant 42.0 : f32
+  %c42 = arith.constant 42.0 : f32
 
   // The "passthrough_fold" folder will naively return its operand, but we don't
   // want to fold here because of the type mismatch.
@@ -85,7 +85,7 @@
 // CHECK-LABEL: test_dialect_canonicalizer
 func @test_dialect_canonicalizer() -> (i32) {
   %0 = "test.dialect_canonicalizable"() : () -> (i32)
-  // CHECK: %[[CST:.*]] = constant 42 : i32
+  // CHECK: %[[CST:.*]] = arith.constant 42 : i32
   // CHECK: return %[[CST]]
   return %0 : i32
 }