[llvm] [DirectX] Scalarize Allocas as part of data scalarization (PR #140165)

Farzon Lotfi via llvm-commits llvm-commits at lists.llvm.org
Thu May 15 17:14:52 PDT 2025


================
@@ -8,12 +8,18 @@
 define internal void @main() #1 {
 ; CHECK-LABEL: define internal void @main() {
 ; CHECK-NEXT:  [[ENTRY:.*:]]
-; CHECK-NEXT:    [[DOTI0:%.*]] = load float, ptr getelementptr inbounds ([24 x float], ptr @StaticArr.scalarized.1dim, i32 1), align 16
----------------
farzonl wrote:

This was an unexpected test update, Both the before and after both look right.

This behavior seems to have something to do with  the fact that we aren't walking uses and doing `cast<ConstantExpr>(U);` anymore. Instrad walking instructons in  basic blocks via `for (Instruction &I : make_early_inc_range(*BB))` seems to force the ConstantExpr to instructions so updated these tests.

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


More information about the llvm-commits mailing list