[all-commits] [llvm/llvm-project] e08f1f: [clang][SPIR-V] Always add convergence intrinsics ...

Nathan Gauër via All-commits all-commits at lists.llvm.org
Tue May 14 08:01:03 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e08f1fda7508138d408cd61608bcbf30f8c3bb4d
      https://github.com/llvm/llvm-project/commit/e08f1fda7508138d408cd61608bcbf30f8c3bb4d
  Author: Nathan Gauër <brioche at google.com>
  Date:   2024-05-14 (Tue, 14 May 2024)

  Changed paths:
    M clang/lib/CodeGen/CGBuiltin.cpp
    M clang/lib/CodeGen/CGCall.cpp
    M clang/lib/CodeGen/CGStmt.cpp
    M clang/lib/CodeGen/CodeGenFunction.cpp
    M clang/lib/CodeGen/CodeGenFunction.h
    M clang/lib/CodeGen/CodeGenModule.h
    M clang/test/CodeGenHLSL/builtins/RWBuffer-constructor.hlsl
    M clang/test/CodeGenHLSL/builtins/lerp.hlsl
    M clang/test/CodeGenHLSL/builtins/mad.hlsl
    A clang/test/CodeGenHLSL/convergence/do.while.hlsl
    A clang/test/CodeGenHLSL/convergence/for.hlsl
    A clang/test/CodeGenHLSL/convergence/while.hlsl

  Log Message:
  -----------
  [clang][SPIR-V] Always add convergence intrinsics (#88918)

PR #80680 added bits in the codegen to lazily add convergence intrinsics
when required. This logic relied on the LoopStack. The issue is when
parsing the condition, the loopstack doesn't yet reflect the correct
values, as expected since we are not yet in the loop.

However, convergence tokens should sometimes already be available. The
solution which seemed the simplest is to greedily generate the tokens
when we generate SPIR-V.

Fixes #88144

---------

Signed-off-by: Nathan Gauër <brioche at google.com>



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