[all-commits] [llvm/llvm-project] 5411eb: [DirectX] add GEP i8 legalization (#142475)

Farzon Lotfi via All-commits all-commits at lists.llvm.org
Wed Jun 4 12:31:37 PDT 2025


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

  Changed paths:
    M llvm/lib/Target/DirectX/DXILLegalizePass.cpp
    M llvm/test/CodeGen/DirectX/legalize-i8.ll

  Log Message:
  -----------
  [DirectX] add GEP i8 legalization (#142475)

fixes #140415

The i8 legalization code in DXILLegalizePass's `fixI8UseChain` needs to
be updated to check for i8 geps.
It seems like there are i8 GEPs being left around after we remove all
the other i8 instructions and this is causing problem on validation.

Since this is cleaning up a missed GEP The approach is to assume the
getPointerOperand is to an alloca we further will check if this is an
array alloca then do some byte offset arithmetic to figure out the
memory index to use. Finally we will emit the new gep and cleanup the
old one.

Finally needed to update upcastI8AllocasAndUses to account for loads off
of GEPs instead of just loads from the alloca.



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