[all-commits] [llvm/llvm-project] 38aec4: [DirectX] Limit GEP transformations to Arrays (#14...

Farzon Lotfi via All-commits all-commits at lists.llvm.org
Wed Jun 25 14:18:14 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 38aec4f1f422daf522e50204b794e9c071e5c61f
      https://github.com/llvm/llvm-project/commit/38aec4f1f422daf522e50204b794e9c071e5c61f
  Author: Farzon Lotfi <farzonlotfi at microsoft.com>
  Date:   2025-06-25 (Wed, 25 Jun 2025)

  Changed paths:
    M llvm/lib/Target/DirectX/DXILDataScalarization.cpp
    A llvm/test/CodeGen/DirectX/issue-145408-gep-struct-fix.ll

  Log Message:
  -----------
  [DirectX] Limit GEP transformations to Arrays (#145758)

fixes #145408

Before we see the GEP we already have transformed Allocas that get
passed the `isArrayOfVectors`.
The bug is because we are trying to transform a gep for struct of arrays
when we should only be transforming arrays.

The problem with our `visitGetElementPtrInst` is that it was doing
transformations for all allocas when it should be limiting it to the
alloca of array cases. Technically we would have liked to make sure it
was an array of vectors cases but by the time we see the GEP the type
has been changed by replace all uses. There should not be a problem with
looking at all Arrays since DXILDataScalarization does not change any
indicies.



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