Keenuts wrote:
Hi all, rebased on main, and addressed the comments.
This commits changes the register order on SPIR-V vs DXIL, which required me
to fix the mad+lerp intrinsic tests. Should be NFC, just storing the register
name in a CHECK variable.
https://github.com/llvm/llvm-project/pull/8
https://github.com/Keenuts updated
https://github.com/llvm/llvm-project/pull/88918
From a8bf6fe83a1c145ef81ee30471dc51de1b5354ef Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nathan=20Gau=C3=ABr?=
Date: Mon, 15 Apr 2024 17:05:40 +0200
Subject: [PATCH 1/5] [clang][SPIR-V] Always add convervence intri
@@ -3101,3 +3130,68 @@ CodeGenFunction::GenerateCapturedStmtFunction(const
CapturedStmt &S) {
return F;
}
+
+namespace {
+// Returns the first convergence entry/loop/anchor instruction found in |BB|.
+// std::nullptr otherwise.
+llvm::IntrinsicInst *getConvergenceToken(llvm
https://github.com/Keenuts updated
https://github.com/llvm/llvm-project/pull/88918
From 94d76dcdfac88d1d50fe705406c0280c33766e15 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nathan=20Gau=C3=ABr?=
Date: Mon, 15 Apr 2024 17:05:40 +0200
Subject: [PATCH 1/4] [clang][SPIR-V] Always add convervence intri
Nathan =?utf-8?q?Gauër?= ,
Nathan =?utf-8?q?Gauër?=
Message-ID:
In-Reply-To:
@@ -3101,3 +3130,68 @@ CodeGenFunction::GenerateCapturedStmtFunction(const
CapturedStmt &S) {
return F;
}
+
+namespace {
+// Returns the first convergence entry/loop/anchor instruction found in
Nathan =?utf-8?q?Gauër?= ,
Nathan =?utf-8?q?Gauër?=
Message-ID:
In-Reply-To:
@@ -3101,3 +3130,68 @@ CodeGenFunction::GenerateCapturedStmtFunction(const
CapturedStmt &S) {
return F;
}
+
+namespace {
+// Returns the first convergence entry/loop/anchor instruction found in
Nathan =?utf-8?q?Gauër?= ,
Nathan =?utf-8?q?Gauër?=
Message-ID:
In-Reply-To:
@@ -3101,3 +3130,68 @@ CodeGenFunction::GenerateCapturedStmtFunction(const
CapturedStmt &S) {
return F;
}
+
+namespace {
+// Returns the first convergence entry/loop/anchor instruction found in
@@ -1109,6 +1124,10 @@ void CodeGenFunction::EmitForStmt(const ForStmt &S,
llvm::BasicBlock *CondBlock = CondDest.getBlock();
EmitBlock(CondBlock);
+ if (getTarget().getTriple().isSPIRVLogical())
Keenuts wrote:
Changed those for a module-level function w
https://github.com/Keenuts updated
https://github.com/llvm/llvm-project/pull/88918
From 94d76dcdfac88d1d50fe705406c0280c33766e15 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nathan=20Gau=C3=ABr?=
Date: Mon, 15 Apr 2024 17:05:40 +0200
Subject: [PATCH 1/3] [clang][SPIR-V] Always add convervence intri
@@ -1109,6 +1124,10 @@ void CodeGenFunction::EmitForStmt(const ForStmt &S,
llvm::BasicBlock *CondBlock = CondDest.getBlock();
EmitBlock(CondBlock);
+ if (getTarget().getTriple().isSPIRVLogical())
Keenuts wrote:
Right, something at the module level, which
Nathan =?utf-8?q?Gauër?=
Message-ID:
In-Reply-To:
@@ -4824,6 +4824,9 @@ llvm::CallInst
*CodeGenFunction::EmitRuntimeCall(llvm::FunctionCallee callee,
llvm::CallInst *call = Builder.CreateCall(
callee, args, getBundlesForFunclet(callee.getCallee()), name);
call->se
Nathan =?utf-8?q?Gauër?=
Message-ID:
In-Reply-To:
@@ -1109,6 +1124,10 @@ void CodeGenFunction::EmitForStmt(const ForStmt &S,
llvm::BasicBlock *CondBlock = CondDest.getBlock();
EmitBlock(CondBlock);
+ if (getTarget().getTriple().isSPIRVLogical())
arsenm
https://github.com/Keenuts updated
https://github.com/llvm/llvm-project/pull/88918
From 94d76dcdfac88d1d50fe705406c0280c33766e15 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nathan=20Gau=C3=ABr?=
Date: Mon, 15 Apr 2024 17:05:40 +0200
Subject: [PATCH 1/2] [clang][SPIR-V] Always add convervence intri
@@ -4987,7 +4990,11 @@ class CodeGenFunction : public CodeGenTypeCache {
const llvm::Twine &Name = "");
// Adds a convergence_ctrl token to |Input| and emits the required parent
// convergence instructions.
- llvm::CallBase *addControll
@@ -4824,6 +4824,9 @@ llvm::CallInst
*CodeGenFunction::EmitRuntimeCall(llvm::FunctionCallee callee,
llvm::CallInst *call = Builder.CreateCall(
callee, args, getBundlesForFunclet(callee.getCallee()), name);
call->setCallingConv(getRuntimeCC());
+
+ if (getTarget().ge
@@ -4987,7 +4990,11 @@ class CodeGenFunction : public CodeGenTypeCache {
const llvm::Twine &Name = "");
// Adds a convergence_ctrl token to |Input| and emits the required parent
// convergence instructions.
- llvm::CallBase *addControll
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Nathan Gauër (Keenuts)
Changes
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 corr
https://github.com/Keenuts created
https://github.com/llvm/llvm-project/pull/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
18 matches
Mail list logo