https://github.com/Icohedron edited
https://github.com/llvm/llvm-project/pull/127098
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Icohedron edited
https://github.com/llvm/llvm-project/pull/127098
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2079,6 +2079,14 @@ static bool CheckFloatingOrIntRepresentation(Sema *S,
CallExpr *TheCall) {
checkAllSignedTypes);
}
+static bool CheckBoolRepresentation(Sema *S, CallExpr *TheCall) {
+ auto checkAllBoolTypes = [](clang::QualType Pass
https://github.com/Icohedron updated
https://github.com/llvm/llvm-project/pull/127098
>From 5b093ca42fdc24f89bfccac25e6f2e17155432f6 Mon Sep 17 00:00:00 2001
From: Icohedron
Date: Wed, 12 Feb 2025 21:24:00 +
Subject: [PATCH 1/6] Implement the 'and' HLSL function
---
clang/include/clang/Ba
@@ -2079,6 +2079,14 @@ static bool CheckFloatingOrIntRepresentation(Sema *S,
CallExpr *TheCall) {
checkAllSignedTypes);
}
+static bool CheckBoolRepresentation(Sema *S, CallExpr *TheCall) {
+ auto checkAllBoolTypes = [](clang::QualType Pass
https://github.com/Icohedron updated
https://github.com/llvm/llvm-project/pull/127098
>From 5b093ca42fdc24f89bfccac25e6f2e17155432f6 Mon Sep 17 00:00:00 2001
From: Icohedron
Date: Wed, 12 Feb 2025 21:24:00 +
Subject: [PATCH 1/5] Implement the 'and' HLSL function
---
clang/include/clang/Ba
@@ -2245,6 +2245,17 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned
BuiltinID, CallExpr *TheCall) {
break;
}
+ case Builtin::BI__builtin_hlsl_and: {
+if (SemaRef.checkArgCount(TheCall, 2))
+ return true;
+if (CheckVectorElementCallArgs(&SemaRef, TheCal
https://github.com/Icohedron edited
https://github.com/llvm/llvm-project/pull/127098
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,27 @@
+// RUN: %clang_cc1 -finclude-default-header -triple \
+// RUN: dxil-pc-shadermodel6.3-library %s \
+// RUN: -emit-llvm -O1 -verify
+
+bool test_too_few_arg(bool a) {
+ return __builtin_hlsl_and(a);
+ // expected-error@-1 {{too few arguments to function call
https://github.com/Icohedron created
https://github.com/llvm/llvm-project/pull/127137
Fixes #99205.
- Implements the HLSL intrinsic `AddUint64` used to perform unsigned 64-bit
integer addition by using pairs of unsigned 32-bit integers instead of native
64-bit types
- The LLVM intrinsic `ua
https://github.com/Icohedron updated
https://github.com/llvm/llvm-project/pull/127098
>From 5b093ca42fdc24f89bfccac25e6f2e17155432f6 Mon Sep 17 00:00:00 2001
From: Icohedron
Date: Wed, 12 Feb 2025 21:24:00 +
Subject: [PATCH 1/3] Implement the 'and' HLSL function
---
clang/include/clang/Ba
https://github.com/Icohedron updated
https://github.com/llvm/llvm-project/pull/127137
>From 4fae5642c6e8e305cdc687b4968ba5eabaa44b50 Mon Sep 17 00:00:00 2001
From: Icohedron
Date: Mon, 27 Jan 2025 11:18:09 -0800
Subject: [PATCH 1/6] Add the AddUint64 HLSL builtin function
- Defines the AddUint
https://github.com/Icohedron updated
https://github.com/llvm/llvm-project/pull/127098
>From e78176bdcc3d0bf93ace334f68da3dce6f6cd78f Mon Sep 17 00:00:00 2001
From: Icohedron
Date: Wed, 12 Feb 2025 21:24:00 +
Subject: [PATCH 1/7] Implement the 'and' HLSL function
---
clang/include/clang/Ba
https://github.com/Icohedron updated
https://github.com/llvm/llvm-project/pull/125599
>From ff7e6425913d77a66ff47335b6ee0f84f2741034 Mon Sep 17 00:00:00 2001
From: Icohedron
Date: Mon, 3 Feb 2025 23:10:16 +
Subject: [PATCH 1/3] Reapply "Reland "[HLSL] Implement the `reflect` HLSL
function"
https://github.com/Icohedron edited
https://github.com/llvm/llvm-project/pull/125599
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Icohedron wrote:
> LGTM regarding previous HWASAN crash, which is gone
Thank you for fixing the issue! I will revert the patches then.
https://github.com/llvm/llvm-project/pull/125599
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lis
https://github.com/Icohedron closed
https://github.com/llvm/llvm-project/pull/125599
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Icohedron updated
https://github.com/llvm/llvm-project/pull/127137
>From 4fae5642c6e8e305cdc687b4968ba5eabaa44b50 Mon Sep 17 00:00:00 2001
From: Icohedron
Date: Mon, 27 Jan 2025 11:18:09 -0800
Subject: [PATCH 1/8] Add the AddUint64 HLSL builtin function
- Defines the AddUint
https://github.com/Icohedron updated
https://github.com/llvm/llvm-project/pull/125599
>From ff7e6425913d77a66ff47335b6ee0f84f2741034 Mon Sep 17 00:00:00 2001
From: Icohedron
Date: Mon, 3 Feb 2025 23:10:16 +
Subject: [PATCH 1/5] Reapply "Reland "[HLSL] Implement the `reflect` HLSL
function"
https://github.com/Icohedron edited
https://github.com/llvm/llvm-project/pull/125599
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,23 @@
+// RUN: %clang_cc1 -finclude-default-header -triple \
+// RUN: dxil-pc-shadermodel6.3-library %s \
+// RUN: -emit-llvm -O1 -verify
Icohedron wrote:
Yes, I will make a PR to fix this
https://github.com/llvm/llvm-project/pull/127098
_
https://github.com/Icohedron created
https://github.com/llvm/llvm-project/pull/128047
@mikaelholmen
[mentioned](https://github.com/llvm/llvm-project/pull/127098#discussion_r1962897888)
that the `-emit-llvm` argument isn't necessary for the `and-errors.hlsl` test
and may cause issues due to wr
https://github.com/Icohedron edited
https://github.com/llvm/llvm-project/pull/125599
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Icohedron wrote:
Because the "underlying" -- though still not fully understood -- cause of the
test failure under hwasan was found (refer to my
[comment](https://github.com/llvm/llvm-project/issues/124045#issuecomment-2669906382)
from issue #124045), I have re-added support for running the tes
https://github.com/Icohedron updated
https://github.com/llvm/llvm-project/pull/127137
>From 4fae5642c6e8e305cdc687b4968ba5eabaa44b50 Mon Sep 17 00:00:00 2001
From: Icohedron
Date: Mon, 27 Jan 2025 11:18:09 -0800
Subject: [PATCH 01/13] Add the AddUint64 HLSL builtin function
- Defines the AddUi
https://github.com/Icohedron updated
https://github.com/llvm/llvm-project/pull/127137
>From 4fae5642c6e8e305cdc687b4968ba5eabaa44b50 Mon Sep 17 00:00:00 2001
From: Icohedron
Date: Mon, 27 Jan 2025 11:18:09 -0800
Subject: [PATCH 01/13] Add the AddUint64 HLSL builtin function
- Defines the AddUi
@@ -738,6 +739,16 @@ def UMin : DXILOp<40, binary> {
let attributes = [Attributes];
}
+def UAddc : DXILOp<44, binaryWithCarryOrBorrow > {
+ let Doc = "Unsigned 32-bit integer arithmetic add with carry. uaddc(a,b) =
(a+b, a+b overflowed ? 1 : 0)";
+ let intrinsics = [Intri
https://github.com/Icohedron updated
https://github.com/llvm/llvm-project/pull/127137
>From 4fae5642c6e8e305cdc687b4968ba5eabaa44b50 Mon Sep 17 00:00:00 2001
From: Icohedron
Date: Mon, 27 Jan 2025 11:18:09 -0800
Subject: [PATCH 01/14] Add the AddUint64 HLSL builtin function
- Defines the AddUi
https://github.com/Icohedron edited
https://github.com/llvm/llvm-project/pull/127137
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Icohedron edited
https://github.com/llvm/llvm-project/pull/127137
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Icohedron edited
https://github.com/llvm/llvm-project/pull/127137
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Icohedron updated
https://github.com/llvm/llvm-project/pull/127137
>From 4fae5642c6e8e305cdc687b4968ba5eabaa44b50 Mon Sep 17 00:00:00 2001
From: Icohedron
Date: Mon, 27 Jan 2025 11:18:09 -0800
Subject: [PATCH 01/12] Add the AddUint64 HLSL builtin function
- Defines the AddUi
Icohedron wrote:
> The SPIRV test case isn't sufficent. Two reasons.
>
> 1. Since you are not using `__builtin_addc ` Your codegen path for
> `uadd.with.overflow` is custom to HLSL. Your emitter is in
> `EmitHLSLBuiltinExpr`.
> 2. `llvm/test/CodeGen/SPIRV/llvm-intrinsics/uadd.with.overflow.ll`
https://github.com/Icohedron edited
https://github.com/llvm/llvm-project/pull/127137
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,88 @@
+; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv-unknown-unknown %s -o - |
FileCheck %s
+; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-unknown-unknown %s -o -
-filetype=obj | spirv-val %}
+
+; Code here is an excerpt of clang/test/CodeGenHLSL/builtins/Add
https://github.com/Icohedron edited
https://github.com/llvm/llvm-project/pull/127137
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Icohedron edited
https://github.com/llvm/llvm-project/pull/127137
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,71 @@
+; RUN: opt -S -scalarizer -dxil-op-lower
-mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s
+
+; CHECK: %dx.types.i32c = type { i32, i1 }
+
+define noundef i32 @test_UAddc(i32 noundef %a, i32 noundef %b) {
+; CHECK-LABEL: define noundef i32 @test_UAddc(
+
@@ -0,0 +1,71 @@
+; RUN: opt -S -scalarizer -dxil-op-lower
-mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s
+
+; CHECK: %dx.types.i32c = type { i32, i1 }
+
+define noundef i32 @test_UAddc(i32 noundef %a, i32 noundef %b) {
+; CHECK-LABEL: define noundef i32 @test_UAddc(
+
@@ -0,0 +1,71 @@
+; RUN: opt -S -scalarizer -dxil-op-lower
-mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s
+
+; CHECK: %dx.types.i32c = type { i32, i1 }
+
+define noundef i32 @test_UAddc(i32 noundef %a, i32 noundef %b) {
+; CHECK-LABEL: define noundef i32 @test_UAddc(
+
@@ -738,6 +739,16 @@ def UMin : DXILOp<40, binary> {
let attributes = [Attributes];
}
+def UAddc : DXILOp<44, binaryWithCarryOrBorrow > {
+ let Doc = "Unsigned 32-bit integer arithmetic add with carry. uaddc(a,b) =
(a+b, a+b overflowed ? 1 : 0)";
+ let intrinsics = [Intri
https://github.com/Icohedron edited
https://github.com/llvm/llvm-project/pull/127137
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Icohedron edited
https://github.com/llvm/llvm-project/pull/127137
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Icohedron edited
https://github.com/llvm/llvm-project/pull/127137
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -738,6 +739,16 @@ def UMin : DXILOp<40, binary> {
let attributes = [Attributes];
}
+def UAddc : DXILOp<44, binaryWithCarryOrBorrow > {
+ let Doc = "Unsigned 32-bit integer arithmetic add with carry. uaddc(a,b) =
(a+b, a+b overflowed ? 1 : 0)";
+ let intrinsics = [Intri
https://github.com/Icohedron edited
https://github.com/llvm/llvm-project/pull/127137
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -738,6 +739,16 @@ def UMin : DXILOp<40, binary> {
let attributes = [Attributes];
}
+def UAddc : DXILOp<44, binaryWithCarryOrBorrow > {
+ let Doc = "Unsigned 32-bit integer arithmetic add with carry. uaddc(a,b) =
(a+b, a+b overflowed ? 1 : 0)";
+ let intrinsics = [Intri
https://github.com/Icohedron edited
https://github.com/llvm/llvm-project/pull/127137
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Icohedron updated
https://github.com/llvm/llvm-project/pull/127137
>From 4fae5642c6e8e305cdc687b4968ba5eabaa44b50 Mon Sep 17 00:00:00 2001
From: Icohedron
Date: Mon, 27 Jan 2025 11:18:09 -0800
Subject: [PATCH 01/11] Add the AddUint64 HLSL builtin function
- Defines the AddUi
https://github.com/Icohedron approved this pull request.
https://github.com/llvm/llvm-project/pull/127670
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Icohedron updated
https://github.com/llvm/llvm-project/pull/127098
>From 5b093ca42fdc24f89bfccac25e6f2e17155432f6 Mon Sep 17 00:00:00 2001
From: Icohedron
Date: Wed, 12 Feb 2025 21:24:00 +
Subject: [PATCH 1/6] Implement the 'and' HLSL function
---
clang/include/clang/Ba
https://github.com/Icohedron updated
https://github.com/llvm/llvm-project/pull/127137
>From 4fae5642c6e8e305cdc687b4968ba5eabaa44b50 Mon Sep 17 00:00:00 2001
From: Icohedron
Date: Mon, 27 Jan 2025 11:18:09 -0800
Subject: [PATCH 1/5] Add the AddUint64 HLSL builtin function
- Defines the AddUint
https://github.com/Icohedron commented:
Looks fine to me, but this change doesn't only affect HLSL does it?
The function `getArrayParameterType` in `ASTContext.cpp` doesn't look like it
is HLSL-specific.
I wonder if a similar bug occurs within C/C++.
https://github.com/llvm/llvm-project/pull/1
https://github.com/Icohedron edited
https://github.com/llvm/llvm-project/pull/127670
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Icohedron updated
https://github.com/llvm/llvm-project/pull/127098
>From e78176bdcc3d0bf93ace334f68da3dce6f6cd78f Mon Sep 17 00:00:00 2001
From: Icohedron
Date: Wed, 12 Feb 2025 21:24:00 +
Subject: [PATCH 1/6] Implement the 'and' HLSL function
---
clang/include/clang/Ba
101 - 155 of 155 matches
Mail list logo