[all-commits] [llvm/llvm-project] ae402a: [Clang][HLSL] Start emitting structured GEP instru...

Nathan Gauër via All-commits all-commits at lists.llvm.org
Thu Feb 19 01:08:42 PST 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ae402a32c0f8d31b348b54c6e99b621328a1d71a
      https://github.com/llvm/llvm-project/commit/ae402a32c0f8d31b348b54c6e99b621328a1d71a
  Author: Nathan Gauër <brioche at google.com>
  Date:   2026-02-19 (Thu, 19 Feb 2026)

  Changed paths:
    M clang/include/clang/Basic/LangOptions.def
    M clang/include/clang/Options/Options.td
    M clang/lib/CodeGen/CGExpr.cpp
    M clang/lib/CodeGen/CGHLSLRuntime.cpp
    A clang/test/CodeGenHLSL/sgep/array_load.hlsl
    A clang/test/CodeGenHLSL/sgep/array_store.hlsl
    A clang/test/CodeGenHLSL/sgep/load_global.hlsl
    A clang/test/CodeGenHLSL/sgep/object_method.hlsl

  Log Message:
  -----------
  [Clang][HLSL] Start emitting structured GEP instruction (#177332)

StructuredGEP is a new LLVM intrinsic which will allow to emit proper
logical SPIR-V or DXIL. To properly stage this change going across FE,
BE and optimizations, this commits adds a new flag:
  - `-fexperimental-emit-sgep`

When used, this flag will allow compatible frontends to emit the new
instructions. This will also allow us to migrate tests bit by bit,
adding the flag to each migrated test as we make progress on the
implementation.

Once the frontend migration complete, the flag will remain, and work on
the backend will start. Compatible backends like SPIR-V will first allow
both instructions, but then, depending on a target bit similar to
`requiresStructuredCFG`, will declare that they require the SGEP
instruction and will start enforcing it.
Once the whole chain completed, the flag will be defaulted to true and
removed, finishing the migration.



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