[llvm] [DirectX] Flatten arrays (PR #114332)

Justin Bogner via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 4 09:25:46 PST 2024


================
@@ -1,4 +1,5 @@
-; RUN: opt -S -passes='dxil-data-scalarization,function(scalarizer<load-store>),dxil-op-lower' -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s
+; RUN: opt -S -passes='dxil-data-scalarization,function(scalarizer<load-store>),dxil-op-lower' -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s -check-prefix DATACHECK
+; RUN: opt -S -passes='dxil-data-scalarization,dxil-flatten-arrays,function(scalarizer<load-store>),dxil-op-lower' -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s
----------------
bogner wrote:

I'm not sure that we really need to add the `flatten-arrays` versions to these scalar tests - this is specifically testing that the scalarizer does the right thing for nested arrays of vectors.

We're already testing that flatten-arrays will do the right thing and flatten these types of arrays in the dedicated test, so all we're getting here by running a second version of the test is a couple of extra test cases with arrays that happen to be flat. We could simply add those types of arrays to the test directly if we're worried about coverage, and then we don't need to have the complexity of multiple run lines that do rather different things.


https://github.com/llvm/llvm-project/pull/114332


More information about the llvm-commits mailing list