[all-commits] [llvm/llvm-project] 352215: [DirectX] Simplify and correct the flattening of G...
Deric C. via All-commits
all-commits at lists.llvm.org
Mon Jul 14 16:39:23 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 352215c6eb291a20f62e7744dc2f7e4a6de46f8d
https://github.com/llvm/llvm-project/commit/352215c6eb291a20f62e7744dc2f7e4a6de46f8d
Author: Deric C. <cheung.deric at gmail.com>
Date: 2025-07-14 (Mon, 14 Jul 2025)
Changed paths:
M llvm/lib/Target/DirectX/DXILFlattenArrays.cpp
M llvm/test/CodeGen/DirectX/flatten-array.ll
M llvm/test/CodeGen/DirectX/flatten-bug-117273.ll
M llvm/test/CodeGen/DirectX/llc-vector-load-scalarize.ll
M llvm/test/CodeGen/DirectX/scalar-bug-117273.ll
M llvm/test/CodeGen/DirectX/scalarize-alloca.ll
Log Message:
-----------
[DirectX] Simplify and correct the flattening of GEPs in DXILFlattenArrays (#146173)
In tandem with #146800, this PR fixes #145370
This PR simplifies the logic for collapsing GEP chains and replacing
GEPs to multidimensional arrays with GEPs to flattened arrays. This
implementation avoids unnecessary recursion and more robustly computes
the index to the flattened array by using the GEPOperator's
collectOffset function, which has the side effect of allowing "i8 GEPs"
and other types of GEPs to be handled naturally in the flattening /
collapsing of GEP chains.
Furthermore, a handful of LLVM DirectX CodeGen tests have been edited to
fix incorrect GEP offsets, mismatched types (e.g., loading i32s from a
an array of floats), and typos.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list