[all-commits] [llvm/llvm-project] e1683e: [IR][DirectX] Drop IsTokenLike from `dx.*` target ...

Justin Bogner via All-commits all-commits at lists.llvm.org
Tue Sep 8 18:33:37 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e1683efa7ce0c77dbd2f3b04e05e18313aee4338
      https://github.com/llvm/llvm-project/commit/e1683efa7ce0c77dbd2f3b04e05e18313aee4338
  Author: Justin Bogner <mail at justinbogner.com>
  Date:   2026-09-08 (Tue, 08 Sep 2026)

  Changed paths:
    M llvm/lib/IR/Type.cpp
    M llvm/test/CodeGen/DirectX/ResourceAccess/handle-cases.ll
    M llvm/test/CodeGen/DirectX/ResourceAccess/handle-to-index.ll
    M llvm/test/CodeGen/DirectX/ResourceAccess/looped-phi-nodes-resolved.ll
    M llvm/test/CodeGen/DirectX/ResourceAccess/looped-phi-nodes.ll
    M llvm/test/Transforms/GVN/PRE/no-phi-translate.ll
    M llvm/test/Transforms/GVN/PRE/no-pre-load-for-token-like.ll
    M llvm/test/Transforms/LCSSA/token-like-live-out.ll
    M llvm/test/Transforms/SimpleLoopUnswitch/token-uses.ll
    R llvm/test/Transforms/SimplifyCFG/token_like_type.ll
    M llvm/test/Verifier/tokenlike1.ll
    M llvm/test/Verifier/tokenlike5.ll
    M llvm/test/Verifier/tokenlike6.ll
    M llvm/test/Verifier/tokenlike7.ll
    M llvm/unittests/Transforms/Utils/LocalTest.cpp

  Log Message:
  -----------
  [IR][DirectX] Drop IsTokenLike from `dx.*` target types (#222130)

We made the DirectX resource types "token-like" a while ago in order to
prevent transforms from moving them into PHIs and the like in ways that
made determining their provenance more difficult. However, there are
patterns in HLSL that can generate the problematic IR directly and we've
since implemented logic in `DXILResourceAccess` to handle such cases
anyway. Because of this, we aren't really getting any benefit from the
types being `IsTokenLike`, and in some cases we're working with
intermediate IR that doesn't actually pass the verifier.

Drop `IsTokenLike` from the `dx.*` types since it's no longer correct or
useful. I've updated the tests to use `amdgpu.stridemark` instead, and
slightly abused `llvm.ssa.copy` in order to manufacture SSA values of
that type. I had to drop the test that actually needed a load from a
value depending on the token-like type, as there just isn't really a way
for that to come up without the resource types.



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