[llvm] [DirectX] Add GlobalDCE pass after finalize linkage pass in DirectX backend (PR #151071)

Farzon Lotfi via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 7 10:21:53 PDT 2025


================
@@ -1,4 +1,4 @@
-; RUN: llc %s -mtriple=dxil-pc-shadermodel6.3-library --filetype=asm -o - | FileCheck %s
+; RUN: opt -S -passes='dxil-data-scalarization,dxil-flatten-arrays' -mtriple=dxil-unknown-shadermodel6.5-compute %s | FileCheck %s
----------------
farzonl wrote:

This test case is intended to be very limited to the effects of the array flattening and  vector scalarization passes. Even if we change the linkage to external it would still get cleaned up by Global DCE. Since we know which two passes are responsible for the data transformations I think its fine to just run those two passes.

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


More information about the llvm-commits mailing list