https://github.com/farzonl edited
https://github.com/llvm/llvm-project/pull/95999
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/farzonl updated
https://github.com/llvm/llvm-project/pull/95999
>From b1876f32ab37e9812142bd0d181c16a2679c1fce Mon Sep 17 00:00:00 2001
From: Farzon Lotfi
Date: Tue, 18 Jun 2024 17:47:13 -0400
Subject: [PATCH] [HLSL][clang] Add elementwise builtins for trig intrinsics
This c
farzonl wrote:
@efriedma-quic if you have time could you take a look? Thanks in advance!
https://github.com/llvm/llvm-project/pull/95999
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/farzonl closed
https://github.com/llvm/llvm-project/pull/93314
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
farzonl wrote:
> Hi, we're seeing a codegen issue building Fuchsia after this patch. I'm
> looking now, but so far I'm not sure why this is happening. Would you mind
> taking a look?
>
> Error:
> fatal error: error in backend: Cannot select: intrinsic %llvm.tan
> PLEASE submit a bug report to
https://github.com/farzonl created
https://github.com/llvm/llvm-project/pull/93721
This reverts commit b15a0a37404f36bcd9c7995de8cd16f9cb5ac8af.
This should undo PR: https://github.com/llvm/llvm-project/pull/93314
will need to re-open https://github.com/llvm/llvm-project/issues/91421
wait for
farzonl wrote:
FYI @ilovepi @bogner to unblock other I am going to merge this reversion now
without approvals.
https://github.com/llvm/llvm-project/pull/93721
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailm
https://github.com/farzonl closed
https://github.com/llvm/llvm-project/pull/93721
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
farzonl wrote:
@ilovepi, How many platforms do you build Fuchsia for? It will be important to
know which backends needs support before we try to re-land this.
https://github.com/llvm/llvm-project/pull/93314
___
cfe-commits mailing list
cfe-commits@l
https://github.com/farzonl created
https://github.com/llvm/llvm-project/pull/93879
- `Attr.td` - Define the HLSL loop attribute hints (unroll and loop)
- `AttrDocs.td` - Add documentation for unroll and loop
- `CGLoopInfo.cpp` - Add codegen for HLSL unroll that maps to clang unroll
expectations
https://github.com/farzonl edited
https://github.com/llvm/llvm-project/pull/93879
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/farzonl edited
https://github.com/llvm/llvm-project/pull/93879
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/farzonl updated
https://github.com/llvm/llvm-project/pull/93879
>From f1fc152552989f307ededc6076b1e97c18b25aa4 Mon Sep 17 00:00:00 2001
From: Farzon Lotfi
Date: Thu, 30 May 2024 13:51:35 -0400
Subject: [PATCH 1/2] [HLSL] add loop unroll - `Attr.td` - Define the HLSL loop
att
https://github.com/farzonl edited
https://github.com/llvm/llvm-project/pull/93879
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/farzonl updated
https://github.com/llvm/llvm-project/pull/93879
>From f1fc152552989f307ededc6076b1e97c18b25aa4 Mon Sep 17 00:00:00 2001
From: Farzon Lotfi
Date: Thu, 30 May 2024 13:51:35 -0400
Subject: [PATCH 1/3] [HLSL] add loop unroll - `Attr.td` - Define the HLSL loop
att
farzonl wrote:
done
https://github.com/llvm/llvm-project/pull/93879
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -635,6 +635,17 @@ void LoopInfoStack::push(BasicBlock *Header,
clang::ASTContext &Ctx,
Option = LoopHintAttr::UnrollCount;
State = LoopHintAttr::Numeric;
}
+} else if (HLSLLoopHint) {
+ ValueInt = HLSLLoopHint->getDirective();
+ if (HLSLL
https://github.com/farzonl updated
https://github.com/llvm/llvm-project/pull/93879
>From f1fc152552989f307ededc6076b1e97c18b25aa4 Mon Sep 17 00:00:00 2001
From: Farzon Lotfi
Date: Thu, 30 May 2024 13:51:35 -0400
Subject: [PATCH 1/4] [HLSL] add loop unroll - `Attr.td` - Define the HLSL loop
att
@@ -584,6 +585,32 @@ static Attr *handleOpenCLUnrollHint(Sema &S, Stmt *St,
const ParsedAttr &A,
return ::new (S.Context) OpenCLUnrollHintAttr(S.Context, A, UnrollFactor);
}
+static Attr *handleHLSLLoopHintAttr(Sema &S, Stmt *St, const ParsedAttr &A,
+
@@ -114,18 +114,21 @@ Parser::ParseStatementOrDeclaration(StmtVector &Stmts,
// here because we don't want to allow arbitrary orderings.
ParsedAttributes CXX11Attrs(AttrFactory);
MaybeParseCXX11Attributes(CXX11Attrs, /*MightBeObjCMessageSend*/ true);
- ParsedAttributes G
@@ -0,0 +1,99 @@
+// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
+// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -o - | FileCheck %s
+
+/*** for ***/
+void for_count()
+{
+// CHECK-LABEL: for_count
farzonl wrote:
`Are we guarant
https://github.com/farzonl updated
https://github.com/llvm/llvm-project/pull/93879
>From f1fc152552989f307ededc6076b1e97c18b25aa4 Mon Sep 17 00:00:00 2001
From: Farzon Lotfi
Date: Thu, 30 May 2024 13:51:35 -0400
Subject: [PATCH 1/4] [HLSL] add loop unroll - `Attr.td` - Define the HLSL loop
att
https://github.com/farzonl updated
https://github.com/llvm/llvm-project/pull/93879
>From 87fe5df0bb46a6bea9b33f30bcb5588f04bef080 Mon Sep 17 00:00:00 2001
From: Farzon Lotfi
Date: Thu, 30 May 2024 13:51:35 -0400
Subject: [PATCH 1/5] [HLSL] add loop unroll - `Attr.td` - Define the HLSL loop
att
@@ -7401,7 +7495,8 @@ b for constant buffer views (CBV).
Register space is specified in the format ``space[number]`` and defaults to
``space0`` if omitted.
Here're resource binding examples with and without space:
-.. code-block:: c++
+
+.. code-block:: hlsl
farzonl wrote:
Thank you for the reviews!
https://github.com/llvm/llvm-project/pull/88325
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/farzonl closed
https://github.com/llvm/llvm-project/pull/88325
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -7337,8 +7337,8 @@ static void handleHLSLResourceBindingAttr(Sema &S, Decl
*D,
// Validate.
if (!Slot.empty()) {
switch (Slot[0]) {
-case 'u':
case 'b':
+case 'u':
farzonl wrote:
Why make this change? if its for alphabetical reasons, s
https://github.com/farzonl edited
https://github.com/llvm/llvm-project/pull/87578
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -7367,8 +7367,72 @@ static void handleHLSLResourceBindingAttr(Sema &S, Decl
*D,
return;
}
- // FIXME: check reg type match decl. Issue
- // https://github.com/llvm/llvm-project/issues/57886.
+ VarDecl *VD = dyn_cast(D);
+ HLSLBufferDecl *BD = dyn_cast(D);
+
+ if
https://github.com/farzonl created
https://github.com/llvm/llvm-project/pull/88976
- `clang/lib/CodeGen/CGBuiltin.cpp` - switch to using `getLerpIntrinsic()` to
abstract backend intrinsic
- `clang/lib/CodeGen/CGHLSLRuntime.h` - add `getLerpIntrinsic()`
- `llvm/include/llvm/IR/IntrinsicsSPIRV.t
https://github.com/farzonl updated
https://github.com/llvm/llvm-project/pull/88976
>From 6d5a126dd2d6c88ab61549a2ac8f5879642393e5 Mon Sep 17 00:00:00 2001
From: Farzon Lotfi
Date: Tue, 16 Apr 2024 15:28:25 -0400
Subject: [PATCH 1/2] [SPIRV][HLSL] map lerp to Fmix
---
clang/lib/CodeGen/CGBuilt
https://github.com/farzonl created
https://github.com/llvm/llvm-project/pull/89130
- `clang/lib/CodeGen/CGBuiltin.cpp` - Add a generic mull add implementation.
Make DXIL implementation tied to target.
- `clang/lib/CodeGen/CGHLSLRuntime.cpp` - existing target switching only lets
you swap on int
https://github.com/farzonl updated
https://github.com/llvm/llvm-project/pull/88976
>From 4ba820a9a0fac5417d133c607df9854a43368356 Mon Sep 17 00:00:00 2001
From: Farzon Lotfi
Date: Tue, 16 Apr 2024 15:28:25 -0400
Subject: [PATCH 1/3] [SPIRV][HLSL] map lerp to Fmix
---
clang/lib/CodeGen/CGBuilt
https://github.com/farzonl updated
https://github.com/llvm/llvm-project/pull/89130
>From f1406f8ee7ef0db485186606d5c373322596765a Mon Sep 17 00:00:00 2001
From: Farzon Lotfi
Date: Wed, 17 Apr 2024 15:25:33 -0400
Subject: [PATCH 1/2] [SPIRV][HLSL] Add mad intrinsic lowering for spirv
---
clang
https://github.com/farzonl edited
https://github.com/llvm/llvm-project/pull/89130
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/farzonl closed
https://github.com/llvm/llvm-project/pull/89130
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -58,4 +58,6 @@ let TargetPrefix = "spv" in {
Intrinsic<[ llvm_ptr_ty ], [llvm_i8_ty], [IntrWillReturn]>;
def int_spv_all : DefaultAttrsIntrinsic<[llvm_i1_ty], [llvm_any_ty]>;
def int_spv_any : DefaultAttrsIntrinsic<[llvm_i1_ty], [llvm_any_ty]>;
+ def int_spv_lerp
https://github.com/farzonl closed
https://github.com/llvm/llvm-project/pull/88976
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/farzonl closed
https://github.com/llvm/llvm-project/pull/97111
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -664,6 +664,7 @@ Unless specified otherwise operation(±0) = ±0 and
operation(±infinity) = ±in
T __builtin_elementwise_cosh(T x) return the hyperbolic cosine of
angle x in radians floating point types
T __builtin_elementwise_tanh(T x) retu
@@ -249,6 +249,7 @@ DWARF Support in Clang
Floating Point Support in Clang
---
+- Add ``__builtin_elementwise_length``builtin for floating point types only.
farzonl wrote:
Same comment this doesn't match `__builtin_hlsl_elementwise
@@ -18460,6 +18460,22 @@ Value *CodeGenFunction::EmitHLSLBuiltinExpr(unsigned
BuiltinID,
/*ReturnType=*/X->getType(), CGM.getHLSLRuntime().getLerpIntrinsic(),
ArrayRef{X, Y, S}, nullptr, "hlsl.lerp");
}
+ case Builtin::BI__builtin_hlsl_elementwise_length: {
@@ -0,0 +1,73 @@
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
+// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
+// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
+// RUN: --check-prefixes=CHECK,NATIVE_HALF
+// RUN: %clang_cc1 -fi
@@ -0,0 +1,31 @@
+// RUN: %clang_cc1 -finclude-default-header -triple
dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm
-disable-llvm-passes -verify -verify-ignore-unexpected
+
+bool test_too_few_arg()
+{
+ return __builtin_hlsl_elementwise_length();
+ // ex
@@ -63,5 +63,7 @@ let TargetPrefix = "spv" in {
def int_spv_frac : DefaultAttrsIntrinsic<[LLVMMatchType<0>],
[llvm_anyfloat_ty]>;
def int_spv_lerp : Intrinsic<[LLVMMatchType<0>], [llvm_anyfloat_ty,
LLVMMatchType<0>,LLVMMatchType<0>],
[IntrNoMem, IntrWillReturn] >;
+
@@ -18460,6 +18460,22 @@ Value *CodeGenFunction::EmitHLSLBuiltinExpr(unsigned
BuiltinID,
/*ReturnType=*/X->getType(), CGM.getHLSLRuntime().getLerpIntrinsic(),
ArrayRef{X, Y, S}, nullptr, "hlsl.lerp");
}
+ case Builtin::BI__builtin_hlsl_elementwise_length: {
@@ -1079,6 +1079,28 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned
BuiltinID, CallExpr *TheCall) {
return true;
break;
}
+ case Builtin::BI__builtin_hlsl_elementwise_length: {
+if (SemaRef.checkArgCount(TheCall, 1))
+ return true;
+if (SemaRef.Pr
@@ -1079,6 +1079,28 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned
BuiltinID, CallExpr *TheCall) {
return true;
break;
}
+ case Builtin::BI__builtin_hlsl_elementwise_length: {
+if (SemaRef.checkArgCount(TheCall, 1))
+ return true;
+if (SemaRef.Pr
@@ -157,6 +158,42 @@ static bool expandAnyIntrinsic(CallInst *Orig) {
return true;
}
+static bool expandLengthIntrinsic(CallInst *Orig) {
+ Value *X = Orig->getOperand(0);
+ IRBuilder<> Builder(Orig->getParent());
+ Builder.SetInsertPoint(Orig);
+ Type *Ty = X->getType()
@@ -157,6 +158,42 @@ static bool expandAnyIntrinsic(CallInst *Orig) {
return true;
}
+static bool expandLengthIntrinsic(CallInst *Orig) {
+ Value *X = Orig->getOperand(0);
+ IRBuilder<> Builder(Orig->getParent());
+ Builder.SetInsertPoint(Orig);
+ Type *Ty = X->getType()
@@ -157,6 +158,42 @@ static bool expandAnyIntrinsic(CallInst *Orig) {
return true;
}
+static bool expandLengthIntrinsic(CallInst *Orig) {
+ Value *X = Orig->getOperand(0);
+ IRBuilder<> Builder(Orig->getParent());
+ Builder.SetInsertPoint(Orig);
+ Type *Ty = X->getType()
https://github.com/farzonl requested changes to this pull request.
You need test cases for the DXIL expansion pass and the dxil-op-lower pass. It
can be one file called `llvm/test/CodeGen/DirectX/length.ll`
It shold start off like:
```
; RUN: opt -S -dxil-intrinsic-expansion < %s | FileCheck
https://github.com/farzonl edited
https://github.com/llvm/llvm-project/pull/101256
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
farzonl wrote:
> This PR adds the length intrinsic and an HLSL function that uses it. The
> SPIRV implementation is left for a future PR. Fixes #99134
You don't want to mark this as fixed because it will close out this ticket and
you still need to address the SPIRV backend changes.
https://g
farzonl wrote:
> Right, asinf doesn't exist on Windows (see
> llvm/lib/Analysis/TargetLibraryInfo.cpp). We probably need code to promote
> calls to llvm.asin.f32 to 64-bit. Not sure how hard it would be to revert
> this... probably easier to fix forward if we can do that quickly.
>
> We'll ne
farzonl wrote:
> We (Chrome) are seeing linker failures on our x86 Windows builds due to this
> PR: https://crbug.com/355455678
>
> ```
> [12702/86218] LINK glmark2_wgl.exe glmark2_wgl.exe.pdb
> ..\..\third_party\llvm-build\Release+Asserts\bin\lld-link.exe
> /OUT:./glmark2_wgl.exe /nologo
> -
farzonl wrote:
@alanzhao1 @efriedma-quic It should be fixed now by #101268 if you role the
clang build to latest.
https://github.com/llvm/llvm-project/pull/98949
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/ma
@@ -0,0 +1,107 @@
+; RUN: opt -S -dxil-intrinsic-expansion < %s | FileCheck %s
--check-prefixes=CHECK,EXPCHECK
+; RUN: opt -S -dxil-op-lower < %s | FileCheck %s
--check-prefixes=CHECK,DOPCHECK
+
+; ModuleID = 'D:\llvm-project\clang\test\CodeGenHLSL\builtins\length.hlsl'
+sou
@@ -0,0 +1,107 @@
+; RUN: opt -S -dxil-intrinsic-expansion < %s | FileCheck %s
--check-prefixes=CHECK,EXPCHECK
+; RUN: opt -S -dxil-op-lower < %s | FileCheck %s
--check-prefixes=CHECK,DOPCHECK
+
+; ModuleID = 'D:\llvm-project\clang\test\CodeGenHLSL\builtins\length.hlsl'
+sou
@@ -0,0 +1,107 @@
+; RUN: opt -S -dxil-intrinsic-expansion < %s | FileCheck %s
--check-prefixes=CHECK,EXPCHECK
+; RUN: opt -S -dxil-op-lower < %s | FileCheck %s
--check-prefixes=CHECK,DOPCHECK
+
+; ModuleID = 'D:\llvm-project\clang\test\CodeGenHLSL\builtins\length.hlsl'
+sou
@@ -0,0 +1,107 @@
+; RUN: opt -S -dxil-intrinsic-expansion < %s | FileCheck %s
--check-prefixes=CHECK,EXPCHECK
+; RUN: opt -S -dxil-op-lower < %s | FileCheck %s
--check-prefixes=CHECK,DOPCHECK
+
+; ModuleID = 'D:\llvm-project\clang\test\CodeGenHLSL\builtins\length.hlsl'
+sou
@@ -0,0 +1,107 @@
+; RUN: opt -S -dxil-intrinsic-expansion < %s | FileCheck %s
--check-prefixes=CHECK,EXPCHECK
+; RUN: opt -S -dxil-op-lower < %s | FileCheck %s
--check-prefixes=CHECK,DOPCHECK
+
+; ModuleID = 'D:\llvm-project\clang\test\CodeGenHLSL\builtins\length.hlsl'
+sou
@@ -0,0 +1,107 @@
+; RUN: opt -S -dxil-intrinsic-expansion < %s | FileCheck %s
--check-prefixes=CHECK,EXPCHECK
+; RUN: opt -S -dxil-op-lower < %s | FileCheck %s
--check-prefixes=CHECK,DOPCHECK
+
+; ModuleID = 'D:\llvm-project\clang\test\CodeGenHLSL\builtins\length.hlsl'
+sou
@@ -0,0 +1,107 @@
+; RUN: opt -S -dxil-intrinsic-expansion < %s | FileCheck %s
--check-prefixes=CHECK,EXPCHECK
+; RUN: opt -S -dxil-op-lower < %s | FileCheck %s
--check-prefixes=CHECK,DOPCHECK
+
+; ModuleID = 'D:\llvm-project\clang\test\CodeGenHLSL\builtins\length.hlsl'
+sou
@@ -0,0 +1,107 @@
+; RUN: opt -S -dxil-intrinsic-expansion < %s | FileCheck %s
--check-prefixes=CHECK,EXPCHECK
+; RUN: opt -S -dxil-op-lower < %s | FileCheck %s
--check-prefixes=CHECK,DOPCHECK
+
+; ModuleID = 'D:\llvm-project\clang\test\CodeGenHLSL\builtins\length.hlsl'
+sou
@@ -0,0 +1,107 @@
+; RUN: opt -S -dxil-intrinsic-expansion < %s | FileCheck %s
--check-prefixes=CHECK,EXPCHECK
+; RUN: opt -S -dxil-op-lower < %s | FileCheck %s
--check-prefixes=CHECK,DOPCHECK
+
+; ModuleID = 'D:\llvm-project\clang\test\CodeGenHLSL\builtins\length.hlsl'
+sou
@@ -0,0 +1,107 @@
+; RUN: opt -S -dxil-intrinsic-expansion < %s | FileCheck %s
--check-prefixes=CHECK,EXPCHECK
+; RUN: opt -S -dxil-op-lower < %s | FileCheck %s
--check-prefixes=CHECK,DOPCHECK
+
+; ModuleID = 'D:\llvm-project\clang\test\CodeGenHLSL\builtins\length.hlsl'
+sou
@@ -0,0 +1,107 @@
+; RUN: opt -S -dxil-intrinsic-expansion < %s | FileCheck %s
--check-prefixes=CHECK,EXPCHECK
+; RUN: opt -S -dxil-op-lower < %s | FileCheck %s
--check-prefixes=CHECK,DOPCHECK
+
+; ModuleID = 'D:\llvm-project\clang\test\CodeGenHLSL\builtins\length.hlsl'
+sou
@@ -0,0 +1,107 @@
+; RUN: opt -S -dxil-intrinsic-expansion < %s | FileCheck %s
--check-prefixes=CHECK,EXPCHECK
+; RUN: opt -S -dxil-op-lower < %s | FileCheck %s
--check-prefixes=CHECK,DOPCHECK
+
+; ModuleID = 'D:\llvm-project\clang\test\CodeGenHLSL\builtins\length.hlsl'
+sou
https://github.com/farzonl requested changes to this pull request.
you need a `llvm/test/CodeGen/DirectX/length_error.ll file. sqrt doesn't
support double.
https://github.com/llvm/llvm-project/pull/101256
___
cfe-commits mailing list
cfe-commits@list
https://github.com/farzonl edited
https://github.com/llvm/llvm-project/pull/101256
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,73 @@
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
+// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
+// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
+// RUN: --check-prefixes=CHECK,NATIVE_HALF
+// RUN: %clang_cc1 -fi
@@ -0,0 +1,31 @@
+// RUN: %clang_cc1 -finclude-default-header -triple
dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm
-disable-llvm-passes -verify -verify-ignore-unexpected
+
+void test_too_few_arg()
+{
+ return __builtin_hlsl_elementwise_length();
@@ -0,0 +1,107 @@
+; RUN: opt -S -dxil-intrinsic-expansion < %s | FileCheck %s
--check-prefixes=CHECK,EXPCHECK
+; RUN: opt -S -dxil-op-lower < %s | FileCheck %s
--check-prefixes=CHECK,DOPCHECK
+
+; ModuleID = 'D:\llvm-project\clang\test\CodeGenHLSL\builtins\length.hlsl'
+sou
https://github.com/farzonl edited
https://github.com/llvm/llvm-project/pull/101256
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/farzonl edited
https://github.com/llvm/llvm-project/pull/101256
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,10 @@
+; RUN: not opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s
2>&1 | FileCheck %s
+
+; DXIL operation length does not support double overload type
+; CHECK: LLVM ERROR: Invalid Overload
+
+define noundef double @test_length_double2(<2 x double> nou
https://github.com/farzonl edited
https://github.com/llvm/llvm-project/pull/101256
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,131 @@
+; RUN: opt -S -dxil-intrinsic-expansion < %s | FileCheck %s
--check-prefixes=CHECK,EXPCHECK
+; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library < %s |
FileCheck %s --check-prefixes=CHECK,DOPCHECK
+
+declare half @llvm.fabs.f16(half)
--
https://github.com/farzonl approved this pull request.
https://github.com/llvm/llvm-project/pull/101256
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
farzonl wrote:
Nice work LGTM!
https://github.com/llvm/llvm-project/pull/101256
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/farzonl updated
https://github.com/llvm/llvm-project/pull/98949
>From 3c31554214d642c8b3ce8b17739d68445adc81d5 Mon Sep 17 00:00:00 2001
From: Farzon Lotfi
Date: Mon, 15 Jul 2024 15:39:14 -0400
Subject: [PATCH 1/2] [clang] Emit constraint intrinsics for arc and hyperbolic
tri
https://github.com/farzonl closed
https://github.com/llvm/llvm-project/pull/98949
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/farzonl edited
https://github.com/llvm/llvm-project/pull/95999
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/farzonl created
https://github.com/llvm/llvm-project/pull/90088
This change is an implementation of #87367's investigation on supporting IEEE
math operations as intrinsics.
Which was discussed in this RFC:
https://discourse.llvm.org/t/rfc-all-the-math-intrinsics/78294
All t
https://github.com/farzonl edited
https://github.com/llvm/llvm-project/pull/90088
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/farzonl updated
https://github.com/llvm/llvm-project/pull/90088
>From de6abd27cb5118e4389d6382a972b66acece5166 Mon Sep 17 00:00:00 2001
From: Farzon Lotfi
Date: Wed, 24 Apr 2024 17:34:04 -0400
Subject: [PATCH 1/6] start of tan intrinsic
---
clang/docs/LanguageExtensions.rst
@@ -39,11 +39,44 @@ static bool isIntrinsicExpansion(Function &F) {
case Intrinsic::dx_uclamp:
case Intrinsic::dx_lerp:
case Intrinsic::dx_rcp:
+ case Intrinsic::dx_sdot:
+ case Intrinsic::dx_udot:
return true;
}
return false;
}
+static bool expandIntegerD
https://github.com/farzonl edited
https://github.com/llvm/llvm-project/pull/90276
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/farzonl created
https://github.com/llvm/llvm-project/pull/90503
This change is an implementation of #87367's investigation on supporting IEEE
math operations as intrinsics.
Which was discussed in this RFC:
https://discourse.llvm.org/t/rfc-all-the-math-intrinsics/78294
If you
https://github.com/farzonl edited
https://github.com/llvm/llvm-project/pull/90088
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/farzonl edited
https://github.com/llvm/llvm-project/pull/90277
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/farzonl ready_for_review
https://github.com/llvm/llvm-project/pull/90276
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/farzonl ready_for_review
https://github.com/llvm/llvm-project/pull/90277
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/farzonl ready_for_review
https://github.com/llvm/llvm-project/pull/90278
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/farzonl ready_for_review
https://github.com/llvm/llvm-project/pull/90503
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
farzonl wrote:
> Nit: the `declare` is not necessary anymore. You touched the IRTranslator
> without a test at, e.g.,
> https://github.com/llvm/llvm-project/blob/main/llvm/test/CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll
The aarch64 backend tag is a misnomer because adding `G_FTAN` caused
farzonl wrote:
> Are you intentionally skipping implementing changes to __builtin_tan()?
Yes but, maybe my reasoning isn't good enough to exclude. Let me know. I didn't
add it for two reasons.
First sine and cosine define builtins like so:
```
def SinF16F128 : Builtin, F16F128MathTemplate {
@@ -674,6 +674,9 @@
# DEBUG-NEXT: .. opcode {{[0-9]+}} is aliased to {{[0-9]+}}
# DEBUG-NEXT: .. the first uncovered type index: 1, OK
# DEBUG-NEXT: .. the first uncovered imm index: 0, OK
+# DEBUG-NEXT: G_FTAN (opcode {{[0-9]+}}): 1 type index, 0 imm indices
f
@@ -674,6 +674,9 @@
# DEBUG-NEXT: .. opcode {{[0-9]+}} is aliased to {{[0-9]+}}
# DEBUG-NEXT: .. the first uncovered type index: 1, OK
# DEBUG-NEXT: .. the first uncovered imm index: 0, OK
+# DEBUG-NEXT: G_FTAN (opcode {{[0-9]+}}): 1 type index, 0 imm indices
f
401 - 500 of 1462 matches
Mail list logo