Nathan =?utf-8?q?Gau=C3=ABr?= ,
Nathan =?utf-8?q?Gau=C3=ABr?= ,
Nathan =?utf-8?q?Gau=C3=ABr?= ,
Nathan =?utf-8?q?Gau=C3=ABr?= ,
Nathan =?utf-8?q?Gau=C3=ABr?=
Message-ID:
In-Reply-To:
https://github.com/farzonl approved this pull request.
https://github.com/llvm/llvm-project/pull/141759
__
Nathan =?utf-8?q?Gauër?= ,
Nathan =?utf-8?q?Gauër?= ,
Nathan =?utf-8?q?Gauër?= ,
Nathan =?utf-8?q?Gauër?= ,
Nathan =?utf-8?q?Gauër?=
Message-ID:
In-Reply-To:
@@ -1147,6 +1154,26 @@ void SemaHLSL::handleSV_DispatchThreadIDAttr(Decl *D,
const ParsedAttr &AL) {
https://github.com/farzonl approved this pull request.
https://github.com/llvm/llvm-project/pull/143519
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Nathan =?utf-8?q?Gauër?= ,
Nathan =?utf-8?q?Gauër?= ,
Nathan =?utf-8?q?Gauër?= ,
Nathan =?utf-8?q?Gauër?= ,
Nathan =?utf-8?q?Gauër?=
Message-ID:
In-Reply-To:
@@ -1147,6 +1154,26 @@ void SemaHLSL::handleSV_DispatchThreadIDAttr(Decl *D,
const ParsedAttr &AL) {
@@ -1147,6 +1154,26 @@ void SemaHLSL::handleSV_DispatchThreadIDAttr(Decl *D,
const ParsedAttr &AL) {
HLSLSV_DispatchThreadIDAttr(getASTContext(), AL));
}
+bool SemaHLSL::diagnosePositionType(QualType T, const ParsedAttr &AL) {
+ const auto *VT = T->getAs();
@@ -764,6 +764,13 @@ void SemaHLSL::CheckSemanticAnnotation(
return;
DiagnoseAttrStageMismatch(AnnotationAttr, ST, {llvm::Triple::Compute});
break;
+ case attr::HLSLSV_Position:
+// TODO: allow use on other shader types & output once the overall semantic
@@ -407,6 +429,13 @@ llvm::Value *CGHLSLRuntime::emitInputSemantic(IRBuilder<>
&B,
llvm::Function *GroupIDIntrinsic = CGM.getIntrinsic(getGroupIdIntrinsic());
return buildVectorInput(B, GroupIDIntrinsic, Ty);
}
+ if (D.hasAttr()) {
+if (getArch() == llvm::Triple
@@ -384,6 +384,28 @@ static Value *buildVectorInput(IRBuilder<> &B, Function
*F, llvm::Type *Ty) {
return B.CreateCall(F, {B.getInt32(0)});
}
+static void addBuiltinDecoration(llvm::GlobalVariable *GV, unsigned BuiltIn) {
+ LLVMContext &Ctx = GV->getContext();
+ IRBuilder
https://github.com/farzonl edited
https://github.com/llvm/llvm-project/pull/141759
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -384,6 +384,28 @@ static Value *buildVectorInput(IRBuilder<> &B, Function
*F, llvm::Type *Ty) {
return B.CreateCall(F, {B.getInt32(0)});
}
+static void addBuiltinDecoration(llvm::GlobalVariable *GV, unsigned BuiltIn) {
+ LLVMContext &Ctx = GV->getContext();
+ IRBuilder
@@ -8472,6 +8472,20 @@ The full documentation is available here:
https://docs.microsoft.com/en-us/windo
}];
}
+def HLSLSV_PositionDocs : Documentation {
+ let Category = DocCatFunction;
+ let Content = [{
+The ``SV_Position`` semantic, when applied to an input parameter i
@@ -8472,6 +8472,20 @@ The full documentation is available here:
https://docs.microsoft.com/en-us/windo
}];
}
+def HLSLSV_PositionDocs : Documentation {
+ let Category = DocCatFunction;
+ let Content = [{
+The ``SV_Position`` semantic, when applied to an input parameter i
@@ -2350,6 +2350,10 @@ _HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_is_first_lane)
__attribute__((convergent)) bool WaveIsFirstLane();
+_HLSL_AVAILABILITY(shadermodel, 6.0)
+_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_get_lane_count)
+__attribute__(
@@ -4909,6 +4909,12 @@ def HLSLWaveReadLaneAt : LangBuiltin<"HLSL_LANG"> {
let Prototype = "void(...)";
}
+def HLSLWaveGetLaneCount : LangBuiltin<"HLSL_LANG"> {
+ let Spellings = ["__builtin_hlsl_wave_get_lane_count"];
+ let Attributes = [NoThrow, Const];
+ let Prototype
https://github.com/farzonl approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/143127
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -691,6 +691,11 @@ Value *CodeGenFunction::EmitHLSLBuiltinExpr(unsigned
BuiltinID,
return EmitRuntimeCall(
Intrinsic::getOrInsertDeclaration(&CGM.getModule(), ID));
}
+ case Builtin::BI__builtin_hlsl_wave_get_lane_count: {
+Intrinsic::ID ID = CGM.getHLSLRu
@@ -4909,6 +4909,12 @@ def HLSLWaveReadLaneAt : LangBuiltin<"HLSL_LANG"> {
let Prototype = "void(...)";
}
+def HLSLWaveGetLaneCount : LangBuiltin<"HLSL_LANG"> {
+ let Spellings = ["__builtin_hlsl_wave_get_lane_count"];
+ let Attributes = [NoThrow, Const];
+ let Prototype
@@ -106,3 +106,57 @@ define i32 @all_imm() {
%2 = sext i8 %1 to i32
ret i32 %2
}
+
+define i32 @scalar_i8_geps() {
+ ; CHECK-LABEL: define i32 @scalar_i8_geps(
+ ; CHECK-NEXT:[[ALLOCA:%.*]] = alloca i32, align 4
+ ; CHECK-NEXT:[[GEP:%.*]] = getelementptr inbounds
https://github.com/farzonl updated
https://github.com/llvm/llvm-project/pull/142475
>From 244b01e43f4c974c682c90d1315c59605da2b289 Mon Sep 17 00:00:00 2001
From: Farzon Lotfi
Date: Mon, 2 Jun 2025 15:40:22 -0400
Subject: [PATCH 1/5] [DirectX] add GEP i8 legalization The i8 legalization
code in
https://github.com/farzonl approved this pull request.
https://github.com/llvm/llvm-project/pull/142401
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
farzonl wrote:
@Naghasan @VyacheslavLevytskyy there is an issue in SemaSPIRV.cpp
```
clang/lib/Sema/SemaSPIRV.cpp:132:3: error: default label in switch which covers
all enumeration values [-Werror,-Wcovered-switch-default]
132 | default:
| ^
1 error generated.
```
https://github.co
@@ -20,7 +20,7 @@ namespace clang {
class SemaSPIRV : public SemaBase {
public:
SemaSPIRV(Sema &S);
-
+ bool CheckVectorArgs(CallExpr *TheCall, unsigned NumArgsToCheck);
farzonl wrote:
This is a helper, we don't need to expose it in the class. No one needs
@@ -0,0 +1,28 @@
+// RUN: %clang_cc1 %s -triple spirv-pc-vulkan-compute -verify
+
+typedef float float2 __attribute__((ext_vector_type(2)));
+
+float2 test_no_second_arg(float2 p0) {
+ return __builtin_spirv_refract(p0);
+ // expected-error@-1 {{too few arguments to function cal
@@ -26,6 +26,12 @@ def SPIRVReflect : Builtin {
let Prototype = "void(...)";
}
+def SPIRVRefract : Builtin {
+ let Spellings = ["__builtin_spirv_refract"];
+ let Attributes = [NoThrow, Const];
farzonl wrote:
You need to add `CustomTypeChecking`.
```sugges
@@ -0,0 +1,290 @@
+// RUN: %clang_cc1 -finclude-default-header -triple \
+// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
+// RUN: -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -finclude-default-header -triple \
+// RUN: spirv-unknown-vulkan-compute %s -f
@@ -2507,13 +2441,9 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned
BuiltinID, CallExpr *TheCall) {
break;
}
case Builtin::BI__builtin_hlsl_dot: {
-if (SemaRef.checkArgCount(TheCall, 2))
farzonl wrote:
a comment to this effect would be good, b
https://github.com/farzonl approved this pull request.
https://github.com/llvm/llvm-project/pull/138429
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/farzonl approved this pull request.
https://github.com/llvm/llvm-project/pull/140627
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/farzonl approved this pull request.
https://github.com/llvm/llvm-project/pull/140315
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,63 @@
+# RUN: llc -verify-machineinstrs -O0 -mtriple spirv-unknown-unknown
-run-pass=spirv-prelegalizer-combiner %s -o - | FileCheck %s
+# REQUIRES: asserts
+---
+name:faceforward_instcombine_float
+tracksRegLiveness: true
+legalized: true
+body:
@@ -0,0 +1,63 @@
+# RUN: llc -verify-machineinstrs -O0 -mtriple spirv-unknown-unknown
-run-pass=spirv-prelegalizer-combiner %s -o - | FileCheck %s
+# REQUIRES: asserts
+---
+name:faceforward_instcombine_float
+tracksRegLiveness: true
+legalized: true
+body:
https://github.com/farzonl edited
https://github.com/llvm/llvm-project/pull/139959
___
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/139959
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -98,21 +110,98 @@ void applySPIRVDistance(MachineInstr &MI,
MachineRegisterInfo &MRI,
SPIRVGlobalRegistry *GR =
MI.getMF()->getSubtarget().getSPIRVGlobalRegistry();
- auto RemoveAllUses = [&](Register Reg) {
-SmallVector UsesToErase(
-llvm::make_pointe
@@ -0,0 +1,63 @@
+# RUN: llc -verify-machineinstrs -O0 -mtriple spirv-unknown-unknown
-run-pass=spirv-prelegalizer-combiner %s -o - | FileCheck %s
+# REQUIRES: asserts
+---
+name:faceforward_instcombine_float
+tracksRegLiveness: true
+legalized: true
+body:
https://github.com/farzonl edited
https://github.com/llvm/llvm-project/pull/139959
___
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/139959
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,63 @@
+# RUN: llc -verify-machineinstrs -O0 -mtriple spirv-unknown-unknown
-run-pass=spirv-prelegalizer-combiner %s -o - | FileCheck %s
+# REQUIRES: asserts
+---
+name:faceforward_instcombine_float
+tracksRegLiveness: true
+legalized: true
+body:
@@ -0,0 +1,13 @@
+; RUN: not llc -verify-machineinstrs -O0 -mtriple=spirv64-unknown-unknown %s
-o /dev/null 2>&1 | FileCheck %s
+; RUN: not llc -verify-machineinstrs -O0 -mtriple=spirv32-unknown-unknown %s
-o /dev/null 2>&1 | FileCheck %s
+
+; CHECK: LLVM ERROR: %{{.*}} = G_INTR
@@ -42,47 +42,47 @@ float2 test_mad_element_type_mismatch(half2 p0, float2 p1) {
float2 test_builtin_mad_float2_splat(float p0, float2 p1) {
return __builtin_hlsl_mad(p0, p1, p1);
- // expected-error@-1 {{all arguments to '__builtin_hlsl_mad' must be
vectors}}
+ // expect
@@ -2507,13 +2441,9 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned
BuiltinID, CallExpr *TheCall) {
break;
}
case Builtin::BI__builtin_hlsl_dot: {
-if (SemaRef.checkArgCount(TheCall, 2))
farzonl wrote:
Why did you remove this? Since you are le
@@ -2446,37 +2376,41 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned
BuiltinID, CallExpr *TheCall) {
case Builtin::BI__builtin_hlsl_any: {
if (SemaRef.checkArgCount(TheCall, 1))
return true;
+if (CheckAnyScalarOrVector(&SemaRef, TheCall, 0))
+ return t
@@ -2446,37 +2376,41 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned
BuiltinID, CallExpr *TheCall) {
case Builtin::BI__builtin_hlsl_any: {
if (SemaRef.checkArgCount(TheCall, 1))
return true;
+if (CheckAnyScalarOrVector(&SemaRef, TheCall, 0))
+ return t
@@ -2446,37 +2376,41 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned
BuiltinID, CallExpr *TheCall) {
case Builtin::BI__builtin_hlsl_any: {
if (SemaRef.checkArgCount(TheCall, 1))
return true;
+if (CheckAnyScalarOrVector(&SemaRef, TheCall, 0))
+ return t
@@ -2446,37 +2376,41 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned
BuiltinID, CallExpr *TheCall) {
case Builtin::BI__builtin_hlsl_any: {
if (SemaRef.checkArgCount(TheCall, 1))
return true;
+if (CheckAnyScalarOrVector(&SemaRef, TheCall, 0))
+ return t
@@ -2164,30 +2083,48 @@ static bool CheckModifiableLValue(Sema *S, CallExpr
*TheCall,
return true;
}
-static bool CheckNoDoubleVectors(Sema *S, CallExpr *TheCall) {
- auto checkDoubleVector = [](clang::QualType PassedType) -> bool {
-if (const auto *VecTy = PassedType-
@@ -0,0 +1,356 @@
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
UTC_ARGS: --version 5
+// RUN: %clang_cc1 -finclude-default-header -triple \
+// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
+// RUN: -emit-llvm -O1 -o - | FileChe
https://github.com/farzonl approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/137805
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/farzonl approved this pull request.
https://github.com/llvm/llvm-project/pull/138541
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
farzonl wrote:
Might be worth looking at usages of ldexp in
https://github.com/microsoft/DirectX-Graphics-Samples/tree/master/MiniEngine/Core/Shaders/PixelPacking_RGBE.hlsli
specically lines 52 and 79 and make sure their is no ambiguous cases to answer
@V-FEXrt question here:
https://github.
https://github.com/farzonl edited
https://github.com/llvm/llvm-project/pull/138182
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -303,6 +303,48 @@ fmod(__detail::HLSL_FIXED_VECTOR X,
return __detail::fmod_vec_impl(X, Y);
}
+//===--===//
+// ldexp builtins
+//===--=
https://github.com/farzonl approved this pull request.
This looks fine.
I would not like to carry forward native half testing of intrinsics that are
written purely in HLSL. I think the builtin ones aren't great either but I
understand how they came to exist.
As for looking at notes. its eas
https://github.com/farzonl edited
https://github.com/llvm/llvm-project/pull/138182
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,39 @@
+// RUN: %clang_cc1 -finclude-default-header -triple
dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only
-disable-llvm-passes -verify
+
+float test_double_inputs(double p0, double p1) {
+ return ldexp(p0, p1);
+ // expected-error@-1 {{no matc
@@ -0,0 +1,49 @@
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple
dxil-pc-shadermodel6.3-library %s -fnative-half-type -emit-llvm
-disable-llvm-passes -o - | FileCheck %s
farzonl wrote:
I was hoping we would only do those for intrinsics that require
@@ -147,7 +147,7 @@ template constexpr vector lit_impl(T
NDotL, T NDotH, T M) {
return Result;
}
-} // namespace __detail
+} // namespace __dETAil
farzonl wrote:
fix this too
https://github.com/llvm/llvm-project/pull/136026
__
@@ -10,7 +10,7 @@
#define _HLSL_HLSL_INTRINSIC_HELPERS_H_
namespace hlsl {
-namespace __detail {
+namespace __dETAil {
farzonl wrote:
this looks like you did find replace for eta. Please revert this change. In the
future you can use clangd' vscode plugin to
farzonl wrote:
I have a strong suspicion all the `*-overload.hlsl` tests have the same
mistake and are also incorrect and need to updated. Can you file a ticket for
investigating\cleaning up the other overload tests. Not work you have to do,
but we should at least track that it needs ot be d
https://github.com/farzonl approved this pull request.
https://github.com/llvm/llvm-project/pull/137898
___
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/137898
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1,108 +1,160 @@
-// RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple \
-// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
-// RUN: -o - | FileCheck %s --check-prefixes=CHECK \
-// RUN: -DFNATTRS="noundef nofpclass(nan inf)"
https://github.com/farzonl approved this pull request.
https://github.com/llvm/llvm-project/pull/137877
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
farzonl wrote:
Since we are open to this for lerp I think we should file a similar issue for
`pow(vector<*>, scalar>);` Its much more user friendlly if we had an overload
that would let us use a scalar for the exponent.
https://github.com/llvm/llvm-project/pull/137877
___
@@ -277,6 +277,12 @@ constexpr bool4 isinf(double4 V) { return
isinf((float4)V); }
// lerp builtins overloads
//===--===//
+template
+constexpr __detail::enable_if_t<(N > 1 && N <= 4), vector>
-
@@ -71,6 +71,27 @@ constexpr vector reflect_vec_impl(vector I,
vector N) {
#endif
}
+template constexpr T refract_impl(T I, T N, T eta) {
+ T k = 1 - eta * eta * (1 - (N * I * N *I));
farzonl wrote:
Install clangd vscode extension it has a tool that will f
https://github.com/farzonl edited
https://github.com/llvm/llvm-project/pull/136026
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3087,6 +3087,8 @@ bool SPIRVInstructionSelector::selectIntrinsic(Register
ResVReg,
return selectExtInst(ResVReg, ResType, I, CL::fract, GL::Fract);
case Intrinsic::spv_normalize:
return selectExtInst(ResVReg, ResType, I, CL::normalize, GL::Normalize);
+ case Int
https://github.com/farzonl edited
https://github.com/llvm/llvm-project/pull/137805
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -35,8 +35,10 @@ static constexpr Builtin::Info BuiltinInfos[] = {
static_assert(std::size(BuiltinInfos) == NumBuiltins);
llvm::SmallVector
-SPIRVTargetInfo::getTargetBuiltins() const {
- return {{&BuiltinStrings, BuiltinInfos}};
+BaseSPIRTargetInfo::getTargetBuiltins() con
@@ -35,8 +35,10 @@ static constexpr Builtin::Info BuiltinInfos[] = {
static_assert(std::size(BuiltinInfos) == NumBuiltins);
llvm::SmallVector
-SPIRVTargetInfo::getTargetBuiltins() const {
- return {{&BuiltinStrings, BuiltinInfos}};
+BaseSPIRTargetInfo::getTargetBuiltins() con
https://github.com/farzonl deleted
https://github.com/llvm/llvm-project/pull/137805
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -5837,12 +5838,13 @@ static void handleBuiltinAliasAttr(Sema &S, Decl *D,
const ParsedAttr &AL) {
bool IsAArch64 = S.Context.getTargetInfo().getTriple().isAArch64();
bool IsARM = S.Context.getTargetInfo().getTriple().isARM();
bool IsRISCV = S.Context.getTargetInfo().g
https://github.com/farzonl edited
https://github.com/llvm/llvm-project/pull/137805
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -35,8 +35,10 @@ static constexpr Builtin::Info BuiltinInfos[] = {
static_assert(std::size(BuiltinInfos) == NumBuiltins);
llvm::SmallVector
-SPIRVTargetInfo::getTargetBuiltins() const {
- return {{&BuiltinStrings, BuiltinInfos}};
+BaseSPIRTargetInfo::getTargetBuiltins() con
@@ -35,8 +35,10 @@ static constexpr Builtin::Info BuiltinInfos[] = {
static_assert(std::size(BuiltinInfos) == NumBuiltins);
llvm::SmallVector
-SPIRVTargetInfo::getTargetBuiltins() const {
- return {{&BuiltinStrings, BuiltinInfos}};
+BaseSPIRTargetInfo::getTargetBuiltins() con
@@ -35,8 +35,10 @@ static constexpr Builtin::Info BuiltinInfos[] = {
static_assert(std::size(BuiltinInfos) == NumBuiltins);
llvm::SmallVector
-SPIRVTargetInfo::getTargetBuiltins() const {
- return {{&BuiltinStrings, BuiltinInfos}};
+BaseSPIRTargetInfo::getTargetBuiltins() con
@@ -71,6 +71,27 @@ constexpr vector reflect_vec_impl(vector I,
vector N) {
#endif
}
+template constexpr T refract_impl(T I, T N, T eta) {
+ T k = 1 - eta * eta * (1 - (N * I * N *I));
+ if(k < 0)
farzonl wrote:
I feel like we can simplify these conditiona
@@ -0,0 +1,356 @@
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
UTC_ARGS: --version 5
+// RUN: %clang_cc1 -finclude-default-header -triple \
+// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
+// RUN: -emit-llvm -O1 -o - | FileChe
@@ -0,0 +1,356 @@
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
UTC_ARGS: --version 5
+// RUN: %clang_cc1 -finclude-default-header -triple \
+// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
+// RUN: -emit-llvm -O1 -o - | FileChe
https://github.com/farzonl approved this pull request.
https://github.com/llvm/llvm-project/pull/137391
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/farzonl approved this pull request.
https://github.com/llvm/llvm-project/pull/136386
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -189,6 +201,9 @@ class DXILPrepareModule : public ModulePass {
for (auto &BB : F) {
IRBuilder<> Builder(&BB);
for (auto &I : make_early_inc_range(BB)) {
+
+ I.dropUnknownNonDebugMetadata(DXILCompatibleMDs);
+
if (I.getOpcode() == Ins
https://github.com/farzonl approved this pull request.
https://github.com/llvm/llvm-project/pull/135878
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/farzonl approved this pull request.
https://github.com/llvm/llvm-project/pull/135848
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/farzonl approved this pull request.
https://github.com/llvm/llvm-project/pull/136580
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,63 @@
+; RUN: llc -O0 -verify-machineinstrs -mtriple=spirv-unknown-unknown %s -o - |
FileCheck %s
+; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-unknown-unknown %s -o -
-filetype=obj | spirv-val --target-env vulkan1.3 %}
+
+; TODO(#136344): This test currently fail
https://github.com/farzonl closed
https://github.com/llvm/llvm-project/pull/136234
___
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/136234
>From 562084ce64581b1cffe30024082f9eb84393875c Mon Sep 17 00:00:00 2001
From: Farzon Lotfi
Date: Thu, 17 Apr 2025 17:42:34 -0700
Subject: [PATCH 1/4] [DirectX] add Function name to DiagnosticInfoUnsupported
Msg
https://github.com/farzonl deleted
https://github.com/llvm/llvm-project/pull/136234
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,7 @@
+// RUN: %if clang-dxc %{not %clang_dxc -T lib_6_3 %s 2>&1 | FileCheck %s %}
farzonl wrote:
I tried REQUIRES: directx-registered-target and it just makes it so the test
gets skipped as unsupported even on my local machine with the directx target
https://github.com/farzonl updated
https://github.com/llvm/llvm-project/pull/136234
>From 562084ce64581b1cffe30024082f9eb84393875c Mon Sep 17 00:00:00 2001
From: Farzon Lotfi
Date: Thu, 17 Apr 2025 17:42:34 -0700
Subject: [PATCH 1/3] [DirectX] add Function name to DiagnosticInfoUnsupported
Msg
https://github.com/farzonl edited
https://github.com/llvm/llvm-project/pull/136234
___
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/136234
>From 562084ce64581b1cffe30024082f9eb84393875c Mon Sep 17 00:00:00 2001
From: Farzon Lotfi
Date: Thu, 17 Apr 2025 17:42:34 -0700
Subject: [PATCH 1/2] [DirectX] add Function name to DiagnosticInfoUnsupported
Msg
farzonl wrote:
> This doesn't seem right. Are we just misusing `DiagnosticInfoUnsupported`
> here? The `Function` argument for `DiagnosticInfoWithLocationBase` is clearly
> meant to be part of the location (as evidenced by the "in function XYZ" part
> of the message). I suspect that we should
https://github.com/farzonl created
https://github.com/llvm/llvm-project/pull/136234
fixes #135654
In #128613 we added safe guards to prevent the lowering of just any intrinsic
in the backend. We used `DiagnosticInfoUnsupported` to do this.
What we found was when using `opt` the diagnostic pri
https://github.com/farzonl edited
https://github.com/llvm/llvm-project/pull/135878
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -105,35 +136,27 @@ bool SemaSPIRV::CheckSPIRVBuiltinFunctionCall(unsigned
BuiltinID,
if (SemaRef.checkArgCount(TheCall, 3))
return true;
-// check if the all arguments have floating representation
-for (unsigned i = 0; i < TheCall->getNumArgs(); ++i) {
-
@@ -0,0 +1,35 @@
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
UTC_ARGS: --version 5
+
+// RUN: %clang_cc1 -O1 -triple spirv-pc-vulkan-compute %s -emit-llvm -o - |
FileCheck %s
+
+typedef float float2 __attribute__((ext_vector_type(2)));
+typedef
https://github.com/farzonl edited
https://github.com/llvm/llvm-project/pull/135878
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
1 - 100 of 1336 matches
Mail list logo