[clang] [HLSL] Use llvm::Triple::EnvironmentType instead of HLSLShaderAttr::ShaderType (PR #93847)

2024-05-30 Thread Cooper Partin via cfe-commits
https://github.com/coopp approved this pull request. Looks great! I like how clean this change is! https://github.com/llvm/llvm-project/pull/93847 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [clang] Add tanf16 builtin and support for tan constrained intrinsic (PR #93314)

2024-05-28 Thread Cooper Partin via cfe-commits
https://github.com/coopp approved this pull request. Looks good to me. 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

[clang] [HLSL][CMake] Cache files don't have generator vars (PR #92793)

2024-05-20 Thread Cooper Partin via cfe-commits
https://github.com/coopp approved this pull request. Looks good to me. https://github.com/llvm/llvm-project/pull/92793 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] HLSL availability diagnostics design doc (PR #92207)

2024-05-15 Thread Cooper Partin via cfe-commits
https://github.com/coopp approved this pull request. This looks good to me. https://github.com/llvm/llvm-project/pull/92207 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] HLSL availability diagnostics design doc (PR #92207)

2024-05-15 Thread Cooper Partin via cfe-commits
@@ -0,0 +1,53 @@ += +HLSL Availability Diagnostics += + +.. contents:: + :local: + +Introduction + + +HLSL availability diagnostics emits errors or warning when unavailable shader APIs are used. Unavailable

[clang] HLSL availability diagnostics design doc (PR #92207)

2024-05-15 Thread Cooper Partin via cfe-commits
@@ -0,0 +1,53 @@ += +HLSL Availability Diagnostics += + +.. contents:: + :local: + +Introduction + + +HLSL availability diagnostics emits errors or warning when unavailable shader APIs are used. Unavailable

[clang] HLSL availability diagnostics design doc (PR #92207)

2024-05-15 Thread Cooper Partin via cfe-commits
@@ -0,0 +1,53 @@ += +HLSL Availability Diagnostics += + +.. contents:: + :local: + +Introduction + + +HLSL availability diagnostics emits errors or warning when unavailable shader APIs are used. Unavailable

[clang] HLSL availability diagnostics design doc (PR #92207)

2024-05-15 Thread Cooper Partin via cfe-commits
@@ -0,0 +1,53 @@ += +HLSL Availability Diagnostics += + +.. contents:: + :local: + +Introduction + + +HLSL availability diagnostics emits errors or warning when unavailable shader APIs are used. Unavailable

[clang] Enable unguarded availability diagnostic on instantiated template functions (PR #91699)

2024-05-10 Thread Cooper Partin via cfe-commits
https://github.com/coopp approved this pull request. Looks fine to me. I assume this doesn't impact other test passes right? Now there is work being done when before it was doing an early out for template instantiations. https://github.com/llvm/llvm-project/pull/91699

[clang] Enable unguarded availability diagnostic on instantiated template functions (PR #91699)

2024-05-10 Thread Cooper Partin via cfe-commits
https://github.com/coopp edited https://github.com/llvm/llvm-project/pull/91699 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Enable unguarded availability diagnostic on instantiated template functions (PR #91699)

2024-05-10 Thread Cooper Partin via cfe-commits
@@ -177,16 +177,19 @@ void justAtAvailable(void) { #ifdef OBJCPP -int f(char) AVAILABLE_10_12; +int f(char) AVAILABLE_10_12; // #f_char_def int f(int); template int use_f() { - // FIXME: We should warn here! - return f(T()); + // expected-warning@#f_call {{'f' is

[clang] [HLSL] Shore up floating point conversions (PR #90222)

2024-05-01 Thread Cooper Partin via cfe-commits
https://github.com/coopp approved this pull request. Looks good. Took me a while to go through all of the tests. Looks like everything is covered! https://github.com/llvm/llvm-project/pull/90222 ___ cfe-commits mailing list

[clang] [NFC][HLSL] Cleanup TargetInfo handling (PR #90694)

2024-05-01 Thread Cooper Partin via cfe-commits
https://github.com/coopp approved this pull request. Just a small nit from me about switch( ) statement formatting in existing code. Not the new code. Looks good to me. https://github.com/llvm/llvm-project/pull/90694 ___ cfe-commits mailing list

[clang] [NFC][HLSL] Cleanup TargetInfo handling (PR #90694)

2024-05-01 Thread Cooper Partin via cfe-commits
@@ -1612,15 +1612,7 @@ const llvm::fltSemantics ::getFloatTypeSemantics(QualType T) const { case BuiltinType::Float16: return Target->getHalfFormat(); case BuiltinType::Half: -// For HLSL, when the native half type is disabled, half will be treat as -// float.

[clang] [NFC] Rename hlsl semantics to hlsl annotations (PR #89309)

2024-04-18 Thread Cooper Partin via cfe-commits
https://github.com/coopp approved this pull request. Looks good https://github.com/llvm/llvm-project/pull/89309 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] Rename hlsl semantics to hlsl annotations (PR #89309)

2024-04-18 Thread Cooper Partin via cfe-commits
@@ -4890,15 +4890,16 @@ class SpellingList { } void add(const Record , FlattenedSpelling Spelling) { -SpellingKind Kind = StringSwitch(Spelling.variety()) -.Case("GNU", SpellingKind::GNU) -.Case("CXX11",

[clang] [clang][CodeGen] Fix shift-exponent ubsan check for signed _BitInt (PR #88004)

2024-04-18 Thread Cooper Partin via cfe-commits
https://github.com/coopp approved this pull request. Looks good to me. https://github.com/llvm/llvm-project/pull/88004 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] Fix shift-exponent ubsan check for signed _BitInt (PR #88004)

2024-04-18 Thread Cooper Partin via cfe-commits
@@ -146,6 +146,15 @@ struct BinOpInfo { return UnOp->getSubExpr()->getType()->isFixedPointType(); return false; } + + /// Check if the RHS has a signed integer representation. coopp wrote: Extra '/' in comment line.

[clang] [clang][SPIR-V] Set AS for the SPIR-V logical triple (PR #88939)

2024-04-16 Thread Cooper Partin via cfe-commits
https://github.com/coopp commented: Looks good https://github.com/llvm/llvm-project/pull/88939 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SPIRV][HLSL] map lerp to Fmix (PR #88976)

2024-04-16 Thread Cooper Partin via cfe-commits
https://github.com/coopp approved this pull request. Looks good to me. 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

[clang] [llvm] [HLSL] move rcp to cgbuiltins (PR #88401)

2024-04-11 Thread Cooper Partin via cfe-commits
https://github.com/coopp approved this pull request. Looks good to me https://github.com/llvm/llvm-project/pull/88401 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement array temporary support (PR #79382)

2024-03-29 Thread Cooper Partin via cfe-commits
https://github.com/coopp approved this pull request. WOW.. This was pretty big. I went through it twice and didn't see anything that jumped out. Looks good to me. https://github.com/llvm/llvm-project/pull/79382 ___ cfe-commits mailing list

[clang] [NFC] Refactor ConstantArrayType size storage (PR #85716)

2024-03-26 Thread Cooper Partin via cfe-commits
https://github.com/coopp approved this pull request. Looks good to me for what I can see in the code. I took special care to make sure places where noticed the old size accessor (CAT->getSize().getZExtValue() ) being called, was now using (CAT->getZExtSize()).

[clang] [CMake][HLSL] Add SPIRV to target list for build (PR #86323)

2024-03-22 Thread Cooper Partin via cfe-commits
https://github.com/coopp approved this pull request. SPIRV in the house! https://github.com/llvm/llvm-project/pull/86323 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DXIL] `exp`, `any`, `lerp`, & `rcp` Intrinsic Lowering (PR #84526)

2024-03-15 Thread Cooper Partin via cfe-commits
@@ -0,0 +1,186 @@ +//===- DXILIntrinsicExpansion.cpp - Prepare LLVM Module for DXIL encoding--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang] [llvm] [DXIL] `exp`, `any`, `lerp`, & `rcp` Intrinsic Lowering (PR #84526)

2024-03-15 Thread Cooper Partin via cfe-commits
https://github.com/coopp approved this pull request. Looks good to me for what I can understand. https://github.com/llvm/llvm-project/pull/84526 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [DXIL] `exp`, `any`, `lerp`, & `rcp` Intrinsic Lowering (PR #84526)

2024-03-15 Thread Cooper Partin via cfe-commits
https://github.com/coopp edited https://github.com/llvm/llvm-project/pull/84526 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [DirectX] Fix HLSL bitshifts to leverage the OpenCL pipeline for bitshifting (PR #81030)

2024-02-08 Thread Cooper Partin via cfe-commits
coopp wrote: > What is the output before this change? It would be nice to add more > information to the PR description. I added a description that shows a before/after output for this change. https://github.com/llvm/llvm-project/pull/81030 ___

[clang] [DirectX] Fix HLSL bitshifts to leverage the OpenCL pipeline for bitshifting (PR #81030)

2024-02-08 Thread Cooper Partin via cfe-commits
https://github.com/coopp edited https://github.com/llvm/llvm-project/pull/81030 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [DirectX] Fix HLSL bitshifts to leverage the OpenCL pipeline for bitshifting (PR #81030)

2024-02-08 Thread Cooper Partin via cfe-commits
https://github.com/coopp edited https://github.com/llvm/llvm-project/pull/81030 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [DirectX] Fix HLSL bitshifts to leverage the OpenCL pipeline for bitshifting Fixes #55106 In HLSL bit shifts are defined to shift by shift size % type size. This contains the following changes

2024-02-08 Thread Cooper Partin via cfe-commits
https://github.com/coopp edited https://github.com/llvm/llvm-project/pull/81030 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [DirectX] Fix HLSL bitshifts to leverage the OpenCL pipeline for bitshifting (PR #81030)

2024-02-08 Thread Cooper Partin via cfe-commits
https://github.com/coopp edited https://github.com/llvm/llvm-project/pull/81030 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [DirectX] Fix HLSL bitshifts to leverage the OpenCL pipeline for bitshifting (#55106) (PR #81030)

2024-02-08 Thread Cooper Partin via cfe-commits
https://github.com/coopp updated https://github.com/llvm/llvm-project/pull/81030 >From eb6c7e6e9d4ccaf6e63714d2d94a518cc00bcc82 Mon Sep 17 00:00:00 2001 From: Cooper Partin Date: Wed, 7 Feb 2024 11:32:56 -0800 Subject: [PATCH 1/2] [DirectX] Fix HLSL bitshifts to leverage the OpenCL pipeline

[clang] [DirectX] Fix HLSL bitshifts to leverage the OpenCL pipeline for bitshifting (#55106) (PR #81030)

2024-02-07 Thread Cooper Partin via cfe-commits
https://github.com/coopp created https://github.com/llvm/llvm-project/pull/81030 None >From eb6c7e6e9d4ccaf6e63714d2d94a518cc00bcc82 Mon Sep 17 00:00:00 2001 From: Cooper Partin Date: Wed, 7 Feb 2024 11:32:56 -0800 Subject: [PATCH] [DirectX] Fix HLSL bitshifts to leverage the OpenCL pipeline