https://github.com/farzonl closed
https://github.com/llvm/llvm-project/pull/83826
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bogner approved this pull request.
https://github.com/llvm/llvm-project/pull/83826
___
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/83826
>From 6aa6d2cd8b999a0173130f7675f561595ed65d8d Mon Sep 17 00:00:00 2001
From: Farzon Lotfi
Date: Sat, 2 Mar 2024 16:40:39 -0500
Subject: [PATCH 1/4] [HLSL] implement mad intrinsic This change implements
#83736 T
@@ -19812,11 +19821,13 @@ bool Sema::SemaBuiltinElementwiseTernaryMath(CallExpr
*TheCall) {
Args[I] = Converted.get();
}
- int ArgOrdinal = 1;
- for (Expr *Arg : Args) {
-if (checkFPMathBuiltinElementType(*this, Arg->getBeginLoc(),
Arg->getType(),
-
https://github.com/farzonl updated
https://github.com/llvm/llvm-project/pull/83826
>From 6aa6d2cd8b999a0173130f7675f561595ed65d8d Mon Sep 17 00:00:00 2001
From: Farzon Lotfi
Date: Sat, 2 Mar 2024 16:40:39 -0500
Subject: [PATCH 1/4] [HLSL] implement mad intrinsic This change implements
#83736 T
@@ -19812,11 +19821,13 @@ bool Sema::SemaBuiltinElementwiseTernaryMath(CallExpr
*TheCall) {
Args[I] = Converted.get();
}
- int ArgOrdinal = 1;
- for (Expr *Arg : Args) {
-if (checkFPMathBuiltinElementType(*this, Arg->getBeginLoc(),
Arg->getType(),
-
@@ -19800,7 +19808,8 @@ bool Sema::SemaBuiltinVectorMath(CallExpr *TheCall,
QualType &Res) {
return false;
}
-bool Sema::SemaBuiltinElementwiseTernaryMath(CallExpr *TheCall) {
+bool Sema::SemaBuiltinElementwiseTernaryMath(CallExpr *TheCall,
+
@@ -19812,11 +19821,13 @@ bool Sema::SemaBuiltinElementwiseTernaryMath(CallExpr
*TheCall) {
Args[I] = Converted.get();
}
- int ArgOrdinal = 1;
- for (Expr *Arg : Args) {
-if (checkFPMathBuiltinElementType(*this, Arg->getBeginLoc(),
Arg->getType(),
-
@@ -19812,11 +19821,13 @@ bool Sema::SemaBuiltinElementwiseTernaryMath(CallExpr
*TheCall) {
Args[I] = Converted.get();
}
- int ArgOrdinal = 1;
- for (Expr *Arg : Args) {
-if (checkFPMathBuiltinElementType(*this, Arg->getBeginLoc(),
Arg->getType(),
-
@@ -5298,6 +5298,14 @@ bool Sema::CheckHLSLBuiltinFunctionCall(unsigned
BuiltinID, CallExpr *TheCall) {
return true;
break;
}
+ case Builtin::BI__builtin_hlsl_mad: {
+if (checkArgCount(*this, TheCall, 3))
+ return true;
+if (CheckVectorElementCallArgs
https://github.com/farzonl updated
https://github.com/llvm/llvm-project/pull/83826
>From 6aa6d2cd8b999a0173130f7675f561595ed65d8d Mon Sep 17 00:00:00 2001
From: Farzon Lotfi
Date: Sat, 2 Mar 2024 16:40:39 -0500
Subject: [PATCH 1/3] [HLSL] implement mad intrinsic This change implements
#83736 T
@@ -19800,7 +19808,8 @@ bool Sema::SemaBuiltinVectorMath(CallExpr *TheCall,
QualType &Res) {
return false;
}
-bool Sema::SemaBuiltinElementwiseTernaryMath(CallExpr *TheCall) {
+bool Sema::SemaBuiltinElementwiseTernaryMath(CallExpr *TheCall,
+
@@ -5298,6 +5298,14 @@ bool Sema::CheckHLSLBuiltinFunctionCall(unsigned
BuiltinID, CallExpr *TheCall) {
return true;
break;
}
+ case Builtin::BI__builtin_hlsl_mad: {
+if (checkArgCount(*this, TheCall, 3))
+ return true;
+if (CheckVectorElementCallArgs
@@ -19812,11 +19821,13 @@ bool Sema::SemaBuiltinElementwiseTernaryMath(CallExpr
*TheCall) {
Args[I] = Converted.get();
}
- int ArgOrdinal = 1;
- for (Expr *Arg : Args) {
-if (checkFPMathBuiltinElementType(*this, Arg->getBeginLoc(),
Arg->getType(),
-
https://github.com/bharadwajy edited
https://github.com/llvm/llvm-project/pull/83826
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bharadwajy approved this pull request.
https://github.com/llvm/llvm-project/pull/83826
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,67 @@
+; RUN: opt -S -dxil-op-lower < %s | FileCheck %s
+
+; Make sure dxil operation function calls for round are generated for float
and half.
+; CHECK:call half @dx.op.tertiary.f16(i32 46, half %{{.*}}, half %{{.*}}, half
%{{.*}})
+; CHECK:call float @dx.op.tertiar
https://github.com/python3kgae approved this pull request.
https://github.com/llvm/llvm-project/pull/83826
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -31,4 +31,8 @@ def int_dx_lerp :
Intrinsic<[LLVMScalarOrSameVectorWidth<0, LLVMVectorElementType<0>>],
[llvm_anyvector_ty, LLVMScalarOrSameVectorWidth<0,
LLVMVectorElementType<0>>,LLVMScalarOrSameVectorWidth<0,
LLVMVectorElementType<0>>],
[IntrNoMem, IntrWillRe
https://github.com/farzonl updated
https://github.com/llvm/llvm-project/pull/83826
>From 410a00aa96f23e99727b2d6b8aa0fa02441d5ecc Mon Sep 17 00:00:00 2001
From: Farzon Lotfi
Date: Sat, 2 Mar 2024 16:40:39 -0500
Subject: [PATCH 1/2] [HLSL] implement mad intrinsic This change implements
#83736 T
github-actions[bot] wrote:
:warning: C/C++ code formatter, clang-format found issues in your code.
:warning:
You can test this locally with the following command:
``bash
git-clang-format --diff e6e53ca8470d719882539359ebe3ad8b442a8cb0
410a00aa96f23e99727b2d6b8aa0fa02441d5ecc --
llvmbot wrote:
@llvm/pr-subscribers-backend-x86
@llvm/pr-subscribers-backend-directx
@llvm/pr-subscribers-llvm-ir
@llvm/pr-subscribers-clang
Author: Farzon Lotfi (farzonl)
Changes
This change implements #83736
The dot product lowering needs a tertiary multipy add operation. DXIL has three
https://github.com/farzonl created
https://github.com/llvm/llvm-project/pull/83826
This change implements #83736
The dot product lowering needs a tertiary multipy add operation. DXIL has three
mad opcodes for `fmad`(46), `imad`(48), and `umad`(49). Dot product in DXIL
only uses `imad`\ `umad`,
23 matches
Mail list logo