From edf5ec80845f5f0ddfd3cb58d9bcd44a1af02c4d Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Wed, 26 May 2021 04:46:41 -0700 Subject: [PATCH] Integrate LLVM at llvm/llvm-project@cb65419b1ac0 Updates LLVM usage to match [cb65419b1ac0](https://github.com/llvm/llvm-project/commit/cb65419b1ac0) PiperOrigin-RevId: 375915516 --- WORKSPACE | 4 ++-- build_tools/llvm_version.txt | 2 +- tests/canonicalize.mlir | 8 ++------ tests/chlo_legalize_to_hlo_broadcasts.mlir | 4 ++-- tests/reduce.mlir | 8 ++++---- 5 files changed, 11 insertions(+), 15 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index 78f1de8..fe4a69b 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -15,9 +15,9 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") -LLVM_COMMIT = "bc56620b8b765b5720dbc1849511fb783e05b8cc" +LLVM_COMMIT = "cb65419b1ac05c3020dd05b64db183712235d2ff" -LLVM_SHA256 = "dc996e2f96576274ddb089162c14afee173ff43cc6b1c8f76206a30f379087f0" +LLVM_SHA256 = "95fcd4af4b21b6cb2ceda9e45d22c6b0014585258cc21727b5c864f7e9804fab" LLVM_BAZEL_TAG = "llvm-project-{commit}".format(commit = LLVM_COMMIT) diff --git a/build_tools/llvm_version.txt b/build_tools/llvm_version.txt index d70b059..e3058f2 100644 --- a/build_tools/llvm_version.txt +++ b/build_tools/llvm_version.txt @@ -1,2 +1,2 @@ -bc56620b8b765b5720dbc1849511fb783e05b8cc +cb65419b1ac05c3020dd05b64db183712235d2ff diff --git a/tests/canonicalize.mlir b/tests/canonicalize.mlir index a3e12e6..a7f2339 100644 --- a/tests/canonicalize.mlir +++ b/tests/canonicalize.mlir @@ -1669,9 +1669,7 @@ func @scatter_negative_index() -> tensor<3x3xi32> { unique_indices = false } : (tensor<3x3xi32>, tensor<2xi32>, tensor<2x3xi32>) -> tensor<3x3xi32> return %3 : tensor<3x3xi32> - // CHECK: constant dense<[ - // CHECK-SAME: [1, 2, 3], [4, 5, 6], [7, 8, 9] - // CHECK-SAME: ]> : tensor<3x3xi32> + // CHECK: constant dense<{{\[}}[1, 2, 3], [4, 5, 6], [7, 8, 9]{{\]}}> : tensor<3x3xi32> // CHECK: "mhlo.scatter" } @@ -1693,9 +1691,7 @@ func @scatter_out_of_bound() -> tensor<3x3xi32> { unique_indices = false } : (tensor<3x3xi32>, tensor<2xi32>, tensor<2x3xi32>) -> tensor<3x3xi32> return %3 : tensor<3x3xi32> - // CHECK: constant dense<[ - // CHECK-SAME: [1, 2, 3], [4, 5, 6], [7, 8, 9] - // CHECK-SAME: ]> : tensor<3x3xi32> + // CHECK: constant dense<{{\[}}[1, 2, 3], [4, 5, 6], [7, 8, 9]{{\]}}> : tensor<3x3xi32> // CHECK: "mhlo.scatter" } diff --git a/tests/chlo_legalize_to_hlo_broadcasts.mlir b/tests/chlo_legalize_to_hlo_broadcasts.mlir index abcc327..ee33833 100644 --- a/tests/chlo_legalize_to_hlo_broadcasts.mlir +++ b/tests/chlo_legalize_to_hlo_broadcasts.mlir @@ -129,8 +129,8 @@ func @selectv2_broadcast_all(%arg0: tensor<8x1x1xi1>, %arg1: tensor<1x8x1xi32>, // CHECK-LABEL: func @selectv2_dynamic_ranked func @selectv2_dynamic_ranked(%arg0: tensor<1xi1>, %arg1: tensor<2x?x8xi32>, %arg2: tensor<2x8x8xi32>) -> tensor<2x?x8xi32> { - // CHECK-NEXT: %[[SHAPE0:.*]] = shape.const_shape [1] : tensor<1xindex> - // CHECK-NEXT: %[[SHAPE2:.*]] = shape.const_shape [2, 8, 8] : tensor<3xindex> + // CHECK-DAG: %[[SHAPE0:.*]] = shape.const_shape [1] : tensor<1xindex> + // CHECK-DAG: %[[SHAPE2:.*]] = shape.const_shape [2, 8, 8] : tensor<3xindex> // CHECK-NEXT: %[[SHAPE1:.*]] = shape.shape_of %arg1 : tensor<2x?x8xi32> -> tensor<3xindex> // CHECK-NEXT: %[[CSTR:.*]] = shape.cstr_broadcastable %[[SHAPE1]], %[[SHAPE0]], %[[SHAPE2]] : tensor<3xindex>, tensor<1xindex>, tensor<3xindex> // CHECK-NEXT: %[[ASSUME:.*]] = shape.assuming %[[CSTR]] -> (tensor<2x?x8xi32>) { diff --git a/tests/reduce.mlir b/tests/reduce.mlir index 4f695a7..19d2f91 100644 --- a/tests/reduce.mlir +++ b/tests/reduce.mlir @@ -35,8 +35,8 @@ func @and_fold() -> (tensor, tensor) { }) {dimensions = dense<0> : tensor<1xi64>} : (tensor<2xi1>, tensor) -> tensor return %4, %5 : tensor, tensor - // CHECK: %[[CST:.*]] = mhlo.constant dense : tensor - // CHECK: %[[CST1:.*]] = mhlo.constant dense : tensor + // CHECK-DAG: %[[CST:.*]] = mhlo.constant dense : tensor + // CHECK-DAG: %[[CST1:.*]] = mhlo.constant dense : tensor // CHECK: return %[[CST]], %[[CST1]] : tensor, tensor } @@ -60,7 +60,7 @@ func @or_fold() -> (tensor, tensor) { }) {dimensions = dense<0> : tensor<1xi64>} : (tensor<2xi1>, tensor) -> tensor return %4, %5 : tensor, tensor - // CHECK: %[[CST:.*]] = mhlo.constant dense : tensor - // CHECK: %[[CST1:.*]] = mhlo.constant dense : tensor + // CHECK-DAG: %[[CST:.*]] = mhlo.constant dense : tensor + // CHECK-DAG: %[[CST1:.*]] = mhlo.constant dense : tensor // CHECK: return %[[CST]], %[[CST1]] : tensor, tensor }