[llvm-branch-commits] [mlir] release/18.x: [mlir] Skip invalid test on big endian platform (s390x) (#80246) (PR #81373)

2024-02-13 Thread Tom Stellard via llvm-branch-commits

https://github.com/tstellar closed 
https://github.com/llvm/llvm-project/pull/81373
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [mlir] release/18.x: [mlir] Skip invalid test on big endian platform (s390x) (#80246) (PR #81373)

2024-02-13 Thread via llvm-branch-commits

https://github.com/llvmbot updated 
https://github.com/llvm/llvm-project/pull/81373

>From 076953d250624b8fdf094f8bce260380e28595ad Mon Sep 17 00:00:00 2001
From: Kai Sasaki 
Date: Fri, 2 Feb 2024 17:07:44 +0900
Subject: [PATCH] [mlir] Skip invalid test on big endian platform (s390x)
 (#80246)

The buildbot test running on s390x platform keeps failing since [this
time](https://lab.llvm.org/buildbot/#/builders/199/builds/31136). This
is because of the dependency on the endianness of the platform. It
expects the format invalid in the big endian platform (s390x). We can
simply skip it.

See: https://discourse.llvm.org/t/mlir-s390x-linux-failure/76695
(cherry picked from commit 65ac8c16e028b23b49fd6b03817faa1ab6c0229d)
---
 .../Target/LLVMIR/llvmir-le-specific.mlir | 27 +++
 mlir/test/Target/LLVMIR/llvmir.mlir   | 23 
 2 files changed, 27 insertions(+), 23 deletions(-)
 create mode 100644 mlir/test/Target/LLVMIR/llvmir-le-specific.mlir

diff --git a/mlir/test/Target/LLVMIR/llvmir-le-specific.mlir 
b/mlir/test/Target/LLVMIR/llvmir-le-specific.mlir
new file mode 100644
index 00..f8d082082117cb
--- /dev/null
+++ b/mlir/test/Target/LLVMIR/llvmir-le-specific.mlir
@@ -0,0 +1,27 @@
+// RUN: mlir-translate -mlir-to-llvmir -split-input-file %s | FileCheck %s
+
+// Decoding the attribute does not work on big-endian platforms currently
+// XFAIL: target=s390x-{{.*}}
+
+// CHECK{LITERAL}: @dense_resource_tensor_constant = internal constant [5 x 
float] [float 0x3FCA03408000, float 0xBFD04663, float 
0xBFD75DDF8000, float 0xBFDE074F4000, float 0x3FDDD3A1C000]
+llvm.mlir.global internal constant 
@dense_resource_tensor_constant(dense_resource : 
tensor<5xf32>) : !llvm.array<5 x f32>
+
+// CHECK{LITERAL}: @dense_resource_vector_constant = internal constant <5 x 
float> 
+llvm.mlir.global internal constant 
@dense_resource_vector_constant(dense_resource : 
vector<5xf32>) : vector<5xf32>
+
+
+// CHECK{LITERAL}: @dense_resource_multidim_tensor_constant = internal 
constant [1 x [2 x [2 x float]]] [[2 x [2 x float]] [[2 x float] [float 
0x3FD6B46A8000, float 0x3FD6781AC000], [2 x float] [float 
0xBFB45A2AA000, float 0x3FD77A5CA000]]]
+llvm.mlir.global internal constant 
@dense_resource_multidim_tensor_constant(dense_resource
 : tensor<1x2x2xf32>) : !llvm.array<1 x !llvm.array<2 x !llvm.array<2 x f32>>>
+
+// CHECK{LITERAL}: @dense_resource_multidim_vector_constant = internal 
constant [1 x [2 x <2 x float>]] [[2 x <2 x float>] [<2 x float> , <2 x float> ]]
+llvm.mlir.global internal constant 
@dense_resource_multidim_vector_constant(dense_resource
 : vector<1x2x2xf32>) : !llvm.array<1 x !llvm.array<2 x vector<2 x f32>>>
+
+// Resources are kept at end of file. New tests should be added above this.
+{-#
+  dialect_resources: {
+builtin: {
+  dense_resource_test_5xf32: 
"0x0800041A503E183382BEFCEEBABE7A3AF0BE0E9DEE3E",
+  dense_resource_test_2x2xf32: "0x080054A3B53ED6C0B33E55D1A2BDE5D2BB3E"
+}
+  }
+#-}
\ No newline at end of file
diff --git a/mlir/test/Target/LLVMIR/llvmir.mlir 
b/mlir/test/Target/LLVMIR/llvmir.mlir
index 448aa3a5d85d79..961c9484446845 100644
--- a/mlir/test/Target/LLVMIR/llvmir.mlir
+++ b/mlir/test/Target/LLVMIR/llvmir.mlir
@@ -101,19 +101,6 @@ llvm.mlir.global internal 
@dense_float_vector_3d(dense<[[[1.0, 2.0], [3.0, 4.0]]
 // CHECK{LITERAL}: @splat_float_vector_3d = internal global [2 x [2 x <2 x 
float>]] [[2 x <2 x float>] [<2 x float> , <2 x float> ], [2 x <2 x 
float>] [<2 x float> , <2 x float> 
]]
 llvm.mlir.global internal @splat_float_vector_3d(dense<42.0> : 
vector<2x2x2xf32>) : !llvm.array<2 x !llvm.array<2 x vector<2xf32>>>
 
-// CHECK{LITERAL}: @dense_resource_tensor_constant = internal constant [5 x 
float] [float 0x3FCA03408000, float 0xBFD04663, float 
0xBFD75DDF8000, float 0xBFDE074F4000, float 0x3FDDD3A1C000]
-llvm.mlir.global internal constant 
@dense_resource_tensor_constant(dense_resource : 
tensor<5xf32>) : !llvm.array<5 x f32>
-
-// CHECK{LITERAL}: @dense_resource_vector_constant = internal constant <5 x 
float> 
-llvm.mlir.global internal constant 
@dense_resource_vector_constant(dense_resource : 
vector<5xf32>) : vector<5xf32>
-
-
-// CHECK{LITERAL}: @dense_resource_multidim_tensor_constant = internal 
constant [1 x [2 x [2 x float]]] [[2 x [2 x float]] [[2 x float] [float 
0x3FD6B46A8000, float 0x3FD6781AC000], [2 x float] [float 
0xBFB45A2AA000, float 0x3FD77A5CA000]]]
-llvm.mlir.global internal constant 
@dense_resource_multidim_tensor_constant(dense_resource
 : tensor<1x2x2xf32>) : !llvm.array<1 x !llvm.array<2 x !llvm.array<2 x f32>>>
-
-// CHECK{LITERAL}: @dense_resource_multidim_vector_constant = internal 
constant [1 x [2 x <2 x float>]] [[2 x <2 x float>] [<2 x float> , <2 x float> ]]
-llvm.mlir.global internal constant 
@dense_resource_multidim_vector_constant(dense_resource
 : vector<1x2x2xf32>) : !llvm.array<1 x 

[llvm-branch-commits] [mlir] release/18.x: [mlir] Skip invalid test on big endian platform (s390x) (#80246) (PR #81373)

2024-02-12 Thread Jacques Pienaar via llvm-branch-commits

https://github.com/jpienaar approved this pull request.


https://github.com/llvm/llvm-project/pull/81373
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [mlir] release/18.x: [mlir] Skip invalid test on big endian platform (s390x) (#80246) (PR #81373)

2024-02-10 Thread Kai Sasaki via llvm-branch-commits

https://github.com/Lewuathe approved this pull request.


https://github.com/llvm/llvm-project/pull/81373
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [mlir] release/18.x: [mlir] Skip invalid test on big endian platform (s390x) (#80246) (PR #81373)

2024-02-10 Thread via llvm-branch-commits

https://github.com/llvmbot updated 
https://github.com/llvm/llvm-project/pull/81373

>From ab6dd5986ab17ad2a9b2ea65e0ebf027e198343c Mon Sep 17 00:00:00 2001
From: Kai Sasaki 
Date: Fri, 2 Feb 2024 17:07:44 +0900
Subject: [PATCH] [mlir] Skip invalid test on big endian platform (s390x)
 (#80246)

The buildbot test running on s390x platform keeps failing since [this
time](https://lab.llvm.org/buildbot/#/builders/199/builds/31136). This
is because of the dependency on the endianness of the platform. It
expects the format invalid in the big endian platform (s390x). We can
simply skip it.

See: https://discourse.llvm.org/t/mlir-s390x-linux-failure/76695
(cherry picked from commit 65ac8c16e028b23b49fd6b03817faa1ab6c0229d)
---
 .../Target/LLVMIR/llvmir-le-specific.mlir | 27 +++
 mlir/test/Target/LLVMIR/llvmir.mlir   | 23 
 2 files changed, 27 insertions(+), 23 deletions(-)
 create mode 100644 mlir/test/Target/LLVMIR/llvmir-le-specific.mlir

diff --git a/mlir/test/Target/LLVMIR/llvmir-le-specific.mlir 
b/mlir/test/Target/LLVMIR/llvmir-le-specific.mlir
new file mode 100644
index 00..f8d082082117cb
--- /dev/null
+++ b/mlir/test/Target/LLVMIR/llvmir-le-specific.mlir
@@ -0,0 +1,27 @@
+// RUN: mlir-translate -mlir-to-llvmir -split-input-file %s | FileCheck %s
+
+// Decoding the attribute does not work on big-endian platforms currently
+// XFAIL: target=s390x-{{.*}}
+
+// CHECK{LITERAL}: @dense_resource_tensor_constant = internal constant [5 x 
float] [float 0x3FCA03408000, float 0xBFD04663, float 
0xBFD75DDF8000, float 0xBFDE074F4000, float 0x3FDDD3A1C000]
+llvm.mlir.global internal constant 
@dense_resource_tensor_constant(dense_resource : 
tensor<5xf32>) : !llvm.array<5 x f32>
+
+// CHECK{LITERAL}: @dense_resource_vector_constant = internal constant <5 x 
float> 
+llvm.mlir.global internal constant 
@dense_resource_vector_constant(dense_resource : 
vector<5xf32>) : vector<5xf32>
+
+
+// CHECK{LITERAL}: @dense_resource_multidim_tensor_constant = internal 
constant [1 x [2 x [2 x float]]] [[2 x [2 x float]] [[2 x float] [float 
0x3FD6B46A8000, float 0x3FD6781AC000], [2 x float] [float 
0xBFB45A2AA000, float 0x3FD77A5CA000]]]
+llvm.mlir.global internal constant 
@dense_resource_multidim_tensor_constant(dense_resource
 : tensor<1x2x2xf32>) : !llvm.array<1 x !llvm.array<2 x !llvm.array<2 x f32>>>
+
+// CHECK{LITERAL}: @dense_resource_multidim_vector_constant = internal 
constant [1 x [2 x <2 x float>]] [[2 x <2 x float>] [<2 x float> , <2 x float> ]]
+llvm.mlir.global internal constant 
@dense_resource_multidim_vector_constant(dense_resource
 : vector<1x2x2xf32>) : !llvm.array<1 x !llvm.array<2 x vector<2 x f32>>>
+
+// Resources are kept at end of file. New tests should be added above this.
+{-#
+  dialect_resources: {
+builtin: {
+  dense_resource_test_5xf32: 
"0x0800041A503E183382BEFCEEBABE7A3AF0BE0E9DEE3E",
+  dense_resource_test_2x2xf32: "0x080054A3B53ED6C0B33E55D1A2BDE5D2BB3E"
+}
+  }
+#-}
\ No newline at end of file
diff --git a/mlir/test/Target/LLVMIR/llvmir.mlir 
b/mlir/test/Target/LLVMIR/llvmir.mlir
index 448aa3a5d85d79..961c9484446845 100644
--- a/mlir/test/Target/LLVMIR/llvmir.mlir
+++ b/mlir/test/Target/LLVMIR/llvmir.mlir
@@ -101,19 +101,6 @@ llvm.mlir.global internal 
@dense_float_vector_3d(dense<[[[1.0, 2.0], [3.0, 4.0]]
 // CHECK{LITERAL}: @splat_float_vector_3d = internal global [2 x [2 x <2 x 
float>]] [[2 x <2 x float>] [<2 x float> , <2 x float> ], [2 x <2 x 
float>] [<2 x float> , <2 x float> 
]]
 llvm.mlir.global internal @splat_float_vector_3d(dense<42.0> : 
vector<2x2x2xf32>) : !llvm.array<2 x !llvm.array<2 x vector<2xf32>>>
 
-// CHECK{LITERAL}: @dense_resource_tensor_constant = internal constant [5 x 
float] [float 0x3FCA03408000, float 0xBFD04663, float 
0xBFD75DDF8000, float 0xBFDE074F4000, float 0x3FDDD3A1C000]
-llvm.mlir.global internal constant 
@dense_resource_tensor_constant(dense_resource : 
tensor<5xf32>) : !llvm.array<5 x f32>
-
-// CHECK{LITERAL}: @dense_resource_vector_constant = internal constant <5 x 
float> 
-llvm.mlir.global internal constant 
@dense_resource_vector_constant(dense_resource : 
vector<5xf32>) : vector<5xf32>
-
-
-// CHECK{LITERAL}: @dense_resource_multidim_tensor_constant = internal 
constant [1 x [2 x [2 x float]]] [[2 x [2 x float]] [[2 x float] [float 
0x3FD6B46A8000, float 0x3FD6781AC000], [2 x float] [float 
0xBFB45A2AA000, float 0x3FD77A5CA000]]]
-llvm.mlir.global internal constant 
@dense_resource_multidim_tensor_constant(dense_resource
 : tensor<1x2x2xf32>) : !llvm.array<1 x !llvm.array<2 x !llvm.array<2 x f32>>>
-
-// CHECK{LITERAL}: @dense_resource_multidim_vector_constant = internal 
constant [1 x [2 x <2 x float>]] [[2 x <2 x float>] [<2 x float> , <2 x float> ]]
-llvm.mlir.global internal constant 
@dense_resource_multidim_vector_constant(dense_resource
 : vector<1x2x2xf32>) : !llvm.array<1 x 

[llvm-branch-commits] [mlir] release/18.x: [mlir] Skip invalid test on big endian platform (s390x) (#80246) (PR #81373)

2024-02-10 Thread Markus Böck via llvm-branch-commits

https://github.com/zero9178 approved this pull request.


https://github.com/llvm/llvm-project/pull/81373
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [mlir] release/18.x: [mlir] Skip invalid test on big endian platform (s390x) (#80246) (PR #81373)

2024-02-10 Thread Mehdi Amini via llvm-branch-commits

https://github.com/joker-eph approved this pull request.


https://github.com/llvm/llvm-project/pull/81373
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [mlir] release/18.x: [mlir] Skip invalid test on big endian platform (s390x) (#80246) (PR #81373)

2024-02-10 Thread via llvm-branch-commits

llvmbot wrote:




@llvm/pr-subscribers-mlir-llvm

Author: None (llvmbot)


Changes

Backport 65ac8c16e028b23b49fd6b03817faa1ab6c0229d

Requested by: @tstellar

---
Full diff: https://github.com/llvm/llvm-project/pull/81373.diff


2 Files Affected:

- (added) mlir/test/Target/LLVMIR/llvmir-le-specific.mlir (+27) 
- (modified) mlir/test/Target/LLVMIR/llvmir.mlir (-23) 


``diff
diff --git a/mlir/test/Target/LLVMIR/llvmir-le-specific.mlir 
b/mlir/test/Target/LLVMIR/llvmir-le-specific.mlir
new file mode 100644
index 00..f8d082082117cb
--- /dev/null
+++ b/mlir/test/Target/LLVMIR/llvmir-le-specific.mlir
@@ -0,0 +1,27 @@
+// RUN: mlir-translate -mlir-to-llvmir -split-input-file %s | FileCheck %s
+
+// Decoding the attribute does not work on big-endian platforms currently
+// XFAIL: target=s390x-{{.*}}
+
+// CHECK{LITERAL}: @dense_resource_tensor_constant = internal constant [5 x 
float] [float 0x3FCA03408000, float 0xBFD04663, float 
0xBFD75DDF8000, float 0xBFDE074F4000, float 0x3FDDD3A1C000]
+llvm.mlir.global internal constant 
@dense_resource_tensor_constant(dense_resource : 
tensor<5xf32>) : !llvm.array<5 x f32>
+
+// CHECK{LITERAL}: @dense_resource_vector_constant = internal constant <5 x 
float> 
+llvm.mlir.global internal constant 
@dense_resource_vector_constant(dense_resource : 
vector<5xf32>) : vector<5xf32>
+
+
+// CHECK{LITERAL}: @dense_resource_multidim_tensor_constant = internal 
constant [1 x [2 x [2 x float]]] [[2 x [2 x float]] [[2 x float] [float 
0x3FD6B46A8000, float 0x3FD6781AC000], [2 x float] [float 
0xBFB45A2AA000, float 0x3FD77A5CA000]]]
+llvm.mlir.global internal constant 
@dense_resource_multidim_tensor_constant(dense_resource
 : tensor<1x2x2xf32>) : !llvm.array<1 x !llvm.array<2 x !llvm.array<2 x f32>>>
+
+// CHECK{LITERAL}: @dense_resource_multidim_vector_constant = internal 
constant [1 x [2 x <2 x float>]] [[2 x <2 x float>] [<2 x float> , <2 x float> ]]
+llvm.mlir.global internal constant 
@dense_resource_multidim_vector_constant(dense_resource
 : vector<1x2x2xf32>) : !llvm.array<1 x !llvm.array<2 x vector<2 x f32>>>
+
+// Resources are kept at end of file. New tests should be added above this.
+{-#
+  dialect_resources: {
+builtin: {
+  dense_resource_test_5xf32: 
"0x0800041A503E183382BEFCEEBABE7A3AF0BE0E9DEE3E",
+  dense_resource_test_2x2xf32: "0x080054A3B53ED6C0B33E55D1A2BDE5D2BB3E"
+}
+  }
+#-}
\ No newline at end of file
diff --git a/mlir/test/Target/LLVMIR/llvmir.mlir 
b/mlir/test/Target/LLVMIR/llvmir.mlir
index 448aa3a5d85d79..961c9484446845 100644
--- a/mlir/test/Target/LLVMIR/llvmir.mlir
+++ b/mlir/test/Target/LLVMIR/llvmir.mlir
@@ -101,19 +101,6 @@ llvm.mlir.global internal 
@dense_float_vector_3d(dense<[[[1.0, 2.0], [3.0, 4.0]]
 // CHECK{LITERAL}: @splat_float_vector_3d = internal global [2 x [2 x <2 x 
float>]] [[2 x <2 x float>] [<2 x float> , <2 x float> ], [2 x <2 x 
float>] [<2 x float> , <2 x float> 
]]
 llvm.mlir.global internal @splat_float_vector_3d(dense<42.0> : 
vector<2x2x2xf32>) : !llvm.array<2 x !llvm.array<2 x vector<2xf32>>>
 
-// CHECK{LITERAL}: @dense_resource_tensor_constant = internal constant [5 x 
float] [float 0x3FCA03408000, float 0xBFD04663, float 
0xBFD75DDF8000, float 0xBFDE074F4000, float 0x3FDDD3A1C000]
-llvm.mlir.global internal constant 
@dense_resource_tensor_constant(dense_resource : 
tensor<5xf32>) : !llvm.array<5 x f32>
-
-// CHECK{LITERAL}: @dense_resource_vector_constant = internal constant <5 x 
float> 
-llvm.mlir.global internal constant 
@dense_resource_vector_constant(dense_resource : 
vector<5xf32>) : vector<5xf32>
-
-
-// CHECK{LITERAL}: @dense_resource_multidim_tensor_constant = internal 
constant [1 x [2 x [2 x float]]] [[2 x [2 x float]] [[2 x float] [float 
0x3FD6B46A8000, float 0x3FD6781AC000], [2 x float] [float 
0xBFB45A2AA000, float 0x3FD77A5CA000]]]
-llvm.mlir.global internal constant 
@dense_resource_multidim_tensor_constant(dense_resource
 : tensor<1x2x2xf32>) : !llvm.array<1 x !llvm.array<2 x !llvm.array<2 x f32>>>
-
-// CHECK{LITERAL}: @dense_resource_multidim_vector_constant = internal 
constant [1 x [2 x <2 x float>]] [[2 x <2 x float>] [<2 x float> , <2 x float> ]]
-llvm.mlir.global internal constant 
@dense_resource_multidim_vector_constant(dense_resource
 : vector<1x2x2xf32>) : !llvm.array<1 x !llvm.array<2 x vector<2 x f32>>>
-
 //
 // Linkage attribute.
 //
@@ -1590,16 +1577,6 @@ llvm.func @invokeLandingpad() -> i32 attributes { 
personality = @__gxx_personali
   llvm.invoke %9(%6, %0) to ^bb2 unwind ^bb1 vararg(!llvm.func) : !llvm.ptr, (!llvm.ptr, i32) -> ()
 }
 
-// Resources are kept at end of file. New tests should be added above this.
-{-#
-  dialect_resources: {
-builtin: {
-  dense_resource_test_5xf32: 
"0x0800041A503E183382BEFCEEBABE7A3AF0BE0E9DEE3E",
-  dense_resource_test_2x2xf32: "0x080054A3B53ED6C0B33E55D1A2BDE5D2BB3E"
-}
-  }
-#-}
-
 // -
 
 

[llvm-branch-commits] [mlir] release/18.x: [mlir] Skip invalid test on big endian platform (s390x) (#80246) (PR #81373)

2024-02-10 Thread via llvm-branch-commits

llvmbot wrote:

@efriedma-quic What do you think about merging this PR to the release branch?

https://github.com/llvm/llvm-project/pull/81373
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [mlir] release/18.x: [mlir] Skip invalid test on big endian platform (s390x) (#80246) (PR #81373)

2024-02-10 Thread via llvm-branch-commits

https://github.com/llvmbot milestoned 
https://github.com/llvm/llvm-project/pull/81373
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [mlir] release/18.x: [mlir] Skip invalid test on big endian platform (s390x) (#80246) (PR #81373)

2024-02-10 Thread via llvm-branch-commits

https://github.com/llvmbot created 
https://github.com/llvm/llvm-project/pull/81373

Backport 65ac8c16e028b23b49fd6b03817faa1ab6c0229d

Requested by: @tstellar

>From 11fb729fc0e0fe4ee0bd754ee3d37f7ba674c6de Mon Sep 17 00:00:00 2001
From: Kai Sasaki 
Date: Fri, 2 Feb 2024 17:07:44 +0900
Subject: [PATCH] [mlir] Skip invalid test on big endian platform (s390x)
 (#80246)

The buildbot test running on s390x platform keeps failing since [this
time](https://lab.llvm.org/buildbot/#/builders/199/builds/31136). This
is because of the dependency on the endianness of the platform. It
expects the format invalid in the big endian platform (s390x). We can
simply skip it.

See: https://discourse.llvm.org/t/mlir-s390x-linux-failure/76695
(cherry picked from commit 65ac8c16e028b23b49fd6b03817faa1ab6c0229d)
---
 .../Target/LLVMIR/llvmir-le-specific.mlir | 27 +++
 mlir/test/Target/LLVMIR/llvmir.mlir   | 23 
 2 files changed, 27 insertions(+), 23 deletions(-)
 create mode 100644 mlir/test/Target/LLVMIR/llvmir-le-specific.mlir

diff --git a/mlir/test/Target/LLVMIR/llvmir-le-specific.mlir 
b/mlir/test/Target/LLVMIR/llvmir-le-specific.mlir
new file mode 100644
index 00..f8d082082117cb
--- /dev/null
+++ b/mlir/test/Target/LLVMIR/llvmir-le-specific.mlir
@@ -0,0 +1,27 @@
+// RUN: mlir-translate -mlir-to-llvmir -split-input-file %s | FileCheck %s
+
+// Decoding the attribute does not work on big-endian platforms currently
+// XFAIL: target=s390x-{{.*}}
+
+// CHECK{LITERAL}: @dense_resource_tensor_constant = internal constant [5 x 
float] [float 0x3FCA03408000, float 0xBFD04663, float 
0xBFD75DDF8000, float 0xBFDE074F4000, float 0x3FDDD3A1C000]
+llvm.mlir.global internal constant 
@dense_resource_tensor_constant(dense_resource : 
tensor<5xf32>) : !llvm.array<5 x f32>
+
+// CHECK{LITERAL}: @dense_resource_vector_constant = internal constant <5 x 
float> 
+llvm.mlir.global internal constant 
@dense_resource_vector_constant(dense_resource : 
vector<5xf32>) : vector<5xf32>
+
+
+// CHECK{LITERAL}: @dense_resource_multidim_tensor_constant = internal 
constant [1 x [2 x [2 x float]]] [[2 x [2 x float]] [[2 x float] [float 
0x3FD6B46A8000, float 0x3FD6781AC000], [2 x float] [float 
0xBFB45A2AA000, float 0x3FD77A5CA000]]]
+llvm.mlir.global internal constant 
@dense_resource_multidim_tensor_constant(dense_resource
 : tensor<1x2x2xf32>) : !llvm.array<1 x !llvm.array<2 x !llvm.array<2 x f32>>>
+
+// CHECK{LITERAL}: @dense_resource_multidim_vector_constant = internal 
constant [1 x [2 x <2 x float>]] [[2 x <2 x float>] [<2 x float> , <2 x float> ]]
+llvm.mlir.global internal constant 
@dense_resource_multidim_vector_constant(dense_resource
 : vector<1x2x2xf32>) : !llvm.array<1 x !llvm.array<2 x vector<2 x f32>>>
+
+// Resources are kept at end of file. New tests should be added above this.
+{-#
+  dialect_resources: {
+builtin: {
+  dense_resource_test_5xf32: 
"0x0800041A503E183382BEFCEEBABE7A3AF0BE0E9DEE3E",
+  dense_resource_test_2x2xf32: "0x080054A3B53ED6C0B33E55D1A2BDE5D2BB3E"
+}
+  }
+#-}
\ No newline at end of file
diff --git a/mlir/test/Target/LLVMIR/llvmir.mlir 
b/mlir/test/Target/LLVMIR/llvmir.mlir
index 448aa3a5d85d79..961c9484446845 100644
--- a/mlir/test/Target/LLVMIR/llvmir.mlir
+++ b/mlir/test/Target/LLVMIR/llvmir.mlir
@@ -101,19 +101,6 @@ llvm.mlir.global internal 
@dense_float_vector_3d(dense<[[[1.0, 2.0], [3.0, 4.0]]
 // CHECK{LITERAL}: @splat_float_vector_3d = internal global [2 x [2 x <2 x 
float>]] [[2 x <2 x float>] [<2 x float> , <2 x float> ], [2 x <2 x 
float>] [<2 x float> , <2 x float> 
]]
 llvm.mlir.global internal @splat_float_vector_3d(dense<42.0> : 
vector<2x2x2xf32>) : !llvm.array<2 x !llvm.array<2 x vector<2xf32>>>
 
-// CHECK{LITERAL}: @dense_resource_tensor_constant = internal constant [5 x 
float] [float 0x3FCA03408000, float 0xBFD04663, float 
0xBFD75DDF8000, float 0xBFDE074F4000, float 0x3FDDD3A1C000]
-llvm.mlir.global internal constant 
@dense_resource_tensor_constant(dense_resource : 
tensor<5xf32>) : !llvm.array<5 x f32>
-
-// CHECK{LITERAL}: @dense_resource_vector_constant = internal constant <5 x 
float> 
-llvm.mlir.global internal constant 
@dense_resource_vector_constant(dense_resource : 
vector<5xf32>) : vector<5xf32>
-
-
-// CHECK{LITERAL}: @dense_resource_multidim_tensor_constant = internal 
constant [1 x [2 x [2 x float]]] [[2 x [2 x float]] [[2 x float] [float 
0x3FD6B46A8000, float 0x3FD6781AC000], [2 x float] [float 
0xBFB45A2AA000, float 0x3FD77A5CA000]]]
-llvm.mlir.global internal constant 
@dense_resource_multidim_tensor_constant(dense_resource
 : tensor<1x2x2xf32>) : !llvm.array<1 x !llvm.array<2 x !llvm.array<2 x f32>>>
-
-// CHECK{LITERAL}: @dense_resource_multidim_vector_constant = internal 
constant [1 x [2 x <2 x float>]] [[2 x <2 x float>] [<2 x float> , <2 x float> ]]
-llvm.mlir.global internal constant