[all-commits] [llvm/llvm-project] 581ba1: [DirectX] Fix crash in passes when building with L...

Farzon Lotfi via All-commits all-commits at lists.llvm.org
Thu Jul 24 14:18:08 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 581ba1cbf70bc5f89a095807c16f668a9b00ded9
      https://github.com/llvm/llvm-project/commit/581ba1cbf70bc5f89a095807c16f668a9b00ded9
  Author: Farzon Lotfi <farzonlotfi at microsoft.com>
  Date:   2025-07-24 (Thu, 24 Jul 2025)

  Changed paths:
    M llvm/lib/Target/DirectX/DXILLegalizePass.cpp
    M llvm/lib/Target/DirectX/DXILResourceAccess.cpp
    M llvm/lib/Transforms/Scalar/Scalarizer.cpp

  Log Message:
  -----------
  [DirectX] Fix crash in passes when building with LLVM_ENABLE_EXPENSIVE_CHECKS (#150483)

fixes #148681
fixes #148680

For the scalarizer pass we just need to indicate that scalarization took
place, I used the logic for knowing when to eraseFromParent to indicate
this.

For the DXILLegalizePass  the new `legalizeScalarLoadStoreOnArrays` did
not use `ToRemove` which means our uses of !ToRemove.empty(); was no
longer correct. This meant each legalization now needed a means of
indicated if a change was maded.

For DXILResourceAccess.cpp the `Changed` bool was never set to true.
So removed it and replaced it with `!Resources.empty();` since we only
call `replaceAccess` if we have items in Resources.



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