[clang] [llvm] [HLSL][RootSignature] Add infastructure to parse parameters (PR #133800)

2025-04-03 Thread Finn Plummer via cfe-commits
@@ -32,11 +39,19 @@ struct DescriptorTable { using ClauseType = llvm::dxil::ResourceClass; struct DescriptorTableClause { ClauseType Type; + Register Register; + uint32_t Space = 0; }; // Models RootElement : DescriptorTable | DescriptorTableClause using RootElement =

[clang] [CIR][Upstream] Local initialization for ArrayType (PR #132974)

2025-04-03 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. This looks ready. https://github.com/llvm/llvm-project/pull/132974 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR][Upstream] Local initialization for ArrayType (PR #132974)

2025-04-03 Thread Andy Kaylor via cfe-commits
@@ -110,6 +110,8 @@ class CIRGenFunction : public CIRGenTypeCache { public: mlir::Value createDummyValue(mlir::Location loc, clang::QualType qt); + void emitNullInitialization(mlir::Location loc, Address destPtr, QualType ty); andykaylor wrote: The two em

[clang] [llvm] [DirectX] Implement UseNativeLowPrecision shader flag analysis (PR #134288)

2025-04-03 Thread via cfe-commits
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 HEAD~1 HEAD --extensions cpp -- clang/lib/CodeGen/CGHLSLRuntime.cpp llvm/lib/Target/D

[clang] [llvm] [DirectX] Implement UseNativeLowPrecision shader flag analysis (PR #134288)

2025-04-03 Thread Deric C. via cfe-commits
https://github.com/Icohedron edited https://github.com/llvm/llvm-project/pull/134288 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland "[HLSL][RootSignature] Define and integrate HLSLRootSignatureAttr" (PR #134293)

2025-04-03 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/134293 >From b5a61c786eac10b77c15a16b7425d158396a234b Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Wed, 2 Apr 2025 17:04:57 + Subject: [PATCH 1/2] [HLSL][RootSignature] Define and integrate `HLSLRootSignature

[clang] [HLSL] Implement the `lit` intrinsic (PR #134171)

2025-04-03 Thread Sarah Spall via cfe-commits
@@ -280,6 +280,22 @@ constexpr bool4 isinf(double4 V) { return isinf((float4)V); } _DXC_COMPAT_TERNARY_DOUBLE_OVERLOADS(lerp) _DXC_COMPAT_TERNARY_INTEGER_OVERLOADS(lerp) +//===--===// +// lit builtins overloa

[clang] Reland "[HLSL][RootSignature] Define and integrate HLSLRootSignatureAttr" (PR #134293)

2025-04-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Finn Plummer (inbelic) Changes This pr relands https://github.com/llvm/llvm-project/pull/134124. It resolves the many linking errors during build, [here](https://github.com/llvm/llvm-project/pull/134124#issuecomment-2776370486). There wa

[clang-tools-extra] [NFC] Fixes proposed by code sanitizer. (PR #134138)

2025-04-03 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/134138 >From 608f5827cedbbc65441cefab80fbcdba7a053933 Mon Sep 17 00:00:00 2001 From: Zahira Ammarguellat Date: Wed, 2 Apr 2025 11:52:13 -0700 Subject: [PATCH 1/3] [NFC] Fixes proposed by code sanitizer. --- .../bugp

[clang] [llvm] [NVPTX] Auto-Upgrade llvm.nvvm.atomic.load.{inc,dec}.32 (PR #134111)

2025-04-03 Thread via cfe-commits
@@ -2314,6 +2317,12 @@ static Value *upgradeNVVMIntrinsicCall(StringRef Name, CallBase *CI, Value *Val = CI->getArgOperand(1); Rep = Builder.CreateAtomicRMW(AtomicRMWInst::FAdd, Ptr, Val, MaybeAlign(), AtomicOrdering::SequentiallyConsi

[clang-tools-extra] [llvm] [llvm] add tool to verify mustache library (PR #111487)

2025-04-03 Thread via cfe-commits
PeterChou1 wrote: > Please call this llvm-mustache-spec -- let's try to avoid polluting the > global namespace with niche tools. > > I also wonder whether this shouldn't be a util rather than tool -- this is > purely for internal use, right? Yes this a utility purely for internal use, I did n

[clang] [llvm] [HLSL] Implement dot2add intrinsic (PR #131237)

2025-04-03 Thread Finn Plummer via cfe-commits
https://github.com/inbelic approved this pull request. LGTM once formatting is resolved https://github.com/llvm/llvm-project/pull/131237 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [NFC] Fixes proposed by code sanitizer. (PR #134138)

2025-04-03 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp requested changes to this pull request. The changes to the clang-tidy check should be reverted IMO. Also, please provide more information. What do you mean by "code sanitizer", what is the exact error message, etc. https://github.com/llvm/llvm-project/pull/1341

[clang] [llvm] [llvm][clang] Allocate a new stack instead of spawning a new thread to get more stack space (PR #133173)

2025-04-03 Thread Michael Spencer via cfe-commits
Bigcheese wrote: > If split stacks are negatively impacting profiling, debugging, or other > compiler development tasks, I have to ask, have we considered optimizing > clang stack usage? The issue is we will always have this problem with implicitly built modules. It's naturally recursive as w

[clang] [llvm] [AMDGPU][clang][CodeGen][opt] Add late-resolved feature identifying predicates (PR #134016)

2025-04-03 Thread Alex Voicu via cfe-commits
AlexVlx wrote: > So in short: what you're trying to prevent is "this was stored in a variable, > then checked later when we are no longer on the device, thus the answer is > different". Not quite, although that is definitely an interesting consideration. What I am trying to address here is t

[clang] [Clang][SYCL] Add AOT compilation support for Intel GPUs in clang-sycl-linker (PR #133194)

2025-04-03 Thread Justin Cai via cfe-commits
@@ -0,0 +1,131 @@ +//===--- SYCL.h -*- C++ -*-===// +// +// 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: Ap

[clang] [Clang][SYCL] Add AOT compilation support for Intel GPUs in clang-sycl-linker (PR #133194)

2025-04-03 Thread Justin Cai via cfe-commits
https://github.com/jzc updated https://github.com/llvm/llvm-project/pull/133194 >From 8f22fbe1f6272beec61e62bfae72832d75b4f25b Mon Sep 17 00:00:00 2001 From: "Cai, Justin" Date: Fri, 14 Feb 2025 21:16:27 + Subject: [PATCH 1/6] [SYCL] Add support AOT compilation support for Intel GPUs in cla

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2025-04-03 Thread John McCall via cfe-commits
@@ -0,0 +1,142 @@ +// RUN: %clang_cc1 -triple arm64-apple-ios -std=c++11 -fptrauth-calls -fptrauth-intrinsics -verify -fsyntax-only %s +// RUN: %clang_cc1 -triple aarch64-linux-gnu -std=c++11 -fptrauth-calls -fptrauth-intrinsics -verify -fsyntax-only %s + +#define AQ __ptrauth

[clang-tools-extra] [NFC] Fixes proposed by code sanitizer. (PR #134138)

2025-04-03 Thread Carlos Galvez via cfe-commits
@@ -260,7 +260,7 @@ static IntegerRange createFromType(const ASTContext &Context, llvm::APSInt LowerValue(PrecisionBits + 2, /*isUnsigned*/ false); LowerValue.setBit(PrecisionBits); LowerValue.setSignBit(); -return {LowerValue, UpperValue}; +return {std::mo

[clang] [CIR][Upstream] Local initialization for ArrayType (PR #132974)

2025-04-03 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-aarch64-sve-vla` running on `linaro-g3-04` while building `clang` at step 7 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/17/builds/7001 Here is the relevant piece of the buil

[clang] [llvm] [HLSL] Implement dot2add intrinsic (PR #131237)

2025-04-03 Thread Farzon Lotfi via cfe-commits
farzonl wrote: If you run git checkout main git pull git checkout git rebase main git clang-format main that will also work https://github.com/llvm/llvm-project/pull/131237 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[clang] [CIR][Upstream] Local initialization for ArrayType (PR #132974)

2025-04-03 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper closed https://github.com/llvm/llvm-project/pull/132974 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][RootSignature] Define and integrate `HLSLRootSignatureAttr` (PR #134124)

2025-04-03 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-sie-ubuntu-fast` running on `sie-linux-worker` while building `clang` at step 5 "build-unified-tree". Full details are available at: https://lab.llvm.org/buildbot/#/builders/144/builds/21934 Here is the re

[clang-tools-extra] [NFC] Fixes proposed by code sanitizer. (PR #134138)

2025-04-03 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam ready_for_review https://github.com/llvm/llvm-project/pull/134138 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix unnecessary extra return block emmited during function epilog after musttail call (PR #134282)

2025-04-03 Thread via cfe-commits
https://github.com/kiran-isaac created https://github.com/llvm/llvm-project/pull/134282 closes #104770. We clear the insert point after musttail call, and check for this when generating the function epilog. We also check for a return point when emitting the return statement for a complex val

[clang] [Clang] Fix unnecessary extra return block emmited during function epilog after musttail call (PR #134282)

2025-04-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Kiran (kiran-isaac) Changes closes #104770. We clear the insert point after musttail call, and check for this when generating the function epilog. We also check for a return point when emitting the return statement for a complex

[clang] [CIR][Upstream] Local initialization for ArrayType (PR #132974)

2025-04-03 Thread Amr Hesham via cfe-commits
@@ -110,6 +110,8 @@ class CIRGenFunction : public CIRGenTypeCache { public: mlir::Value createDummyValue(mlir::Location loc, clang::QualType qt); + void emitNullInitialization(mlir::Location loc, Address destPtr, QualType ty); AmrDeveloper wrote: Thank yo

[clang] 262b9b5 - [CIR][Upstream] Local initialization for ArrayType (#132974)

2025-04-03 Thread via cfe-commits
Author: Amr Hesham Date: 2025-04-03T19:25:25+02:00 New Revision: 262b9b515330daf7c446cc7983bf5f89185b3666 URL: https://github.com/llvm/llvm-project/commit/262b9b515330daf7c446cc7983bf5f89185b3666 DIFF: https://github.com/llvm/llvm-project/commit/262b9b515330daf7c446cc7983bf5f89185b3666.diff LO

[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2025-04-03 Thread Jonas Paulsson via cfe-commits
@@ -0,0 +1,63 @@ +# RUN: llc -o - %s -mtriple=s390x-linux-gnu -mcpu=zEC12 -verify-machineinstrs \ +# RUN: -start-before=greedy | FileCheck %s -check-prefix=CHECK +# RUN: llc -o - %s -mtriple=s390x-linux-gnu -mcpu=z16 -verify-machineinstrs \ +# RUN: -start-before=greedy | FileC

[clang] [Clang] Fix unnecessary extra return block emmited during function epilog after musttail call (PR #134282)

2025-04-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kiran (kiran-isaac) Changes closes #104770. We clear the insert point after musttail call, and check for this when generating the function epilog. We also check for a return point when emitting the return statement for a complex value

[clang] [clang] remove unused frontend flag -fretain-subst-template-type-parm-type-ast-nodes (PR #134177)

2025-04-03 Thread Jan Voung via cfe-commits
https://github.com/jvoung approved this pull request. Please go ahead (need to wait for 1 to 2 weeks) and thanks again for splitting! https://github.com/llvm/llvm-project/pull/134177 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[clang] [Clang] Fix unnecessary extra return block emmited during function epilog after musttail call (PR #134282)

2025-04-03 Thread via cfe-commits
https://github.com/kiran-isaac updated https://github.com/llvm/llvm-project/pull/134282 >From 0de953bb0004ff4d75f456fbb73bb6db1b16861e Mon Sep 17 00:00:00 2001 From: kiran Date: Mon, 31 Mar 2025 08:42:11 +0100 Subject: [PATCH 1/2] [Clang] Fix unnecessary extra return block emmited during funct

[clang] [llvm] [HLSL] Implement dot2add intrinsic (PR #131237)

2025-04-03 Thread Sumit Agarwal via cfe-commits
@@ -175,6 +175,21 @@ const inline float distance(__detail::HLSL_FIXED_VECTOR X, return __detail::distance_vec_impl(X, Y); } +//===--===// +// dot2add builtins sumitsays wrote: The general

[clang] [Clang] Fix unnecessary extra return block emmited during function epilog after musttail call (PR #134282)

2025-04-03 Thread via cfe-commits
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 HEAD~1 HEAD --extensions cpp -- clang/lib/CodeGen/CGCall.cpp clang/lib/CodeGen/CGExpr

[clang] [CIR] Upstream support for logical not operations (PR #133966)

2025-04-03 Thread Andy Kaylor via cfe-commits
@@ -1358,6 +1360,33 @@ mlir::Value CIRGenFunction::emitScalarConversion(mlir::Value src, .emitScalarConversion(src, srcTy, dstTy, loc); } +mlir::Value ScalarExprEmitter::VisitUnaryLNot(const UnaryOperator *e) { + // Perform vector logical not on comparison with zero ve

[clang] [llvm] [DirectX] Implement UseNativeLowPrecision shader flag analysis (PR #134288)

2025-04-03 Thread Deric C. via cfe-commits
https://github.com/Icohedron updated https://github.com/llvm/llvm-project/pull/134288 >From c482c96c99ab76458904b3f94b1146ccfee0f55c Mon Sep 17 00:00:00 2001 From: Icohedron Date: Wed, 2 Apr 2025 21:16:16 + Subject: [PATCH 1/4] Add test for UseNativeLowPrecision shader flag --- .../Shader

[clang] [HLSL] Implement the `lit` intrinsic (PR #134171)

2025-04-03 Thread Deric C. via cfe-commits
@@ -253,6 +253,37 @@ const inline float length(__detail::HLSL_FIXED_VECTOR X) { return __detail::length_vec_impl(X); } +//===--===// +// lit builtins +//===--

[clang] [llvm] [clang][IR] Overload @llvm.thread.pointer to support non-AS0 targets (PR #132489)

2025-04-03 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic commented: I think you also need to fix the backends so if they see thread_pointer intrinsic with the wrong address-space, they don't crash. https://github.com/llvm/llvm-project/pull/132489 ___ cfe-commits mailing list

[clang] Hlsl dst function (PR #133828)

2025-04-03 Thread via cfe-commits
https://github.com/metkarpoonam updated https://github.com/llvm/llvm-project/pull/133828 >From 3a45246453d120da108e597d23da0fb8d9df0b1b Mon Sep 17 00:00:00 2001 From: Poonam Vilas Metkar Date: Mon, 31 Mar 2025 16:49:18 -0700 Subject: [PATCH 1/8] Implement a dst function with test cases for HLSL

[clang] [clang-format] add option to control bin-packing keyworded parameters (PR #131605)

2025-04-03 Thread Eugene Shalygin via cfe-commits
zeule wrote: Of course it is only because of the Qt popularity I submit this changeset to the mainline. The keywords are natural delimiters in those declarations, so I can't see the proposed solution to use them as delimiters to be unsuitable to an any significant group of Qt users. In the

[clang] [Clang] [NFC] Introduce a helper for emitting compatibility diagnostics (PR #132348)

2025-04-03 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-with-lto-ubuntu` running on `as-worker-91` while building `clang` at step 7 "test-stage1-compiler". Full details are available at: https://lab.llvm.org/buildbot/#/builders/49/builds/1238 Here is the relevant piece of

[clang] [llvm] [NVPTX] Auto-Upgrade llvm.nvvm.atomic.load.{inc,dec}.32 (PR #134111)

2025-04-03 Thread Alex MacLean via cfe-commits
@@ -2070,8 +2070,8 @@ defm INT_PTX_ATOMIC_UMIN_32 : F_ATOMIC_2_AS]>; // atom_inc atom_dec AlexMaclean wrote: I think it makes sense to test the auto-upgrade rules and test the lowering of the current syntax but not to maintain lowering tests using out-of-dat

[clang] [Driver] Teach Barmetal toolchain about GCC installation (PR #121829)

2025-04-03 Thread Garvit Gupta via cfe-commits
quic-garvgupt wrote: Hi @petrhosek, I've addressed all your comments. Please review the changes and approve the PR if everything looks good. https://github.com/llvm/llvm-project/pull/121829 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

[clang] [llvm] [NVPTX] Auto-Upgrade llvm.nvvm.atomic.load.{inc,dec}.32 (PR #134111)

2025-04-03 Thread Alex MacLean via cfe-commits
@@ -2314,6 +2317,12 @@ static Value *upgradeNVVMIntrinsicCall(StringRef Name, CallBase *CI, Value *Val = CI->getArgOperand(1); Rep = Builder.CreateAtomicRMW(AtomicRMWInst::FAdd, Ptr, Val, MaybeAlign(), AtomicOrdering::SequentiallyConsi

[clang] [Driver] Generalize the `addFortranRuntimeLibs` function in `PPCLinux.cpp` to all Linux platform. (PR #134297)

2025-04-03 Thread Daniel Chen via cfe-commits
DanielCChen wrote: Hello reviewers, This PR is an attempt to generalize the current code that re-uses `compilerRT` in `PPCLinux.cpp` to all Linux platforms. Could you please comment if that is a feasible approach? https://github.com/llvm/llvm-project/pull/134297 ___

[clang] [Clang] Fix unnecessary extra return block emmited during function epilog after musttail call (PR #134282)

2025-04-03 Thread Reid Kleckner via cfe-commits
@@ -3897,6 +3897,13 @@ void CodeGenFunction::EmitFunctionEpilog(const CGFunctionInfo &FI, return; } + // If there is no valid insert point, we won't emit a return. + // The insert point could be null if we have already emitted a return + // (e.g. if musttail) + if (

[clang] [flang] [llvm] [flang-rt] Pass the whole path of libflang_rt.runtime.a to linker on AIX and LoP (PR #131041)

2025-04-03 Thread Daniel Chen via cfe-commits
DanielCChen wrote: > LGTM (I'd generalize this more in a follow on though, there's no reason for > this to be limited to LoP) Thanks for the suggestion! I will investigate that and post a separate PR. https://github.com/llvm/llvm-project/pull/131041

[clang] [llvm] [DirectX] Implement UseNativeLowPrecision shader flag analysis (PR #134288)

2025-04-03 Thread Deric C. via cfe-commits
https://github.com/Icohedron updated https://github.com/llvm/llvm-project/pull/134288 >From c482c96c99ab76458904b3f94b1146ccfee0f55c Mon Sep 17 00:00:00 2001 From: Icohedron Date: Wed, 2 Apr 2025 21:16:16 + Subject: [PATCH 1/3] Add test for UseNativeLowPrecision shader flag --- .../Shader

[clang] cuda clang: Add support for CUDA surfaces (PR #132883)

2025-04-03 Thread via cfe-commits
github-actions[bot] wrote: @AustinSchuh Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a bu

[clang] [llvm] [DirectX] Implement UseNativeLowPrecision shader flag analysis (PR #134288)

2025-04-03 Thread Deric C. via cfe-commits
https://github.com/Icohedron edited https://github.com/llvm/llvm-project/pull/134288 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc][NFC] refactor out file helpers (PR #134298)

2025-04-03 Thread via cfe-commits
https://github.com/PeterChou1 updated https://github.com/llvm/llvm-project/pull/134298 >From fa35468f673ace035036a1c15d2d6ab756c2581e Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Thu, 3 Apr 2025 15:59:34 -0400 Subject: [PATCH 1/4] factor out file helpers --- clang-tools-extra/clang-doc/CMa

[clang] [llvm] [llvm][clang] Allocate a new stack instead of spawning a new thread to get more stack space (PR #133173)

2025-04-03 Thread Michael Spencer via cfe-commits
@@ -52,6 +56,7 @@ else() check_include_file(mach/mach.h HAVE_MACH_MACH_H) check_include_file(malloc/malloc.h HAVE_MALLOC_MALLOC_H) check_include_file(pthread.h HAVE_PTHREAD_H) + check_include_file(sys/resource.h HAVE_SYS_RESOURCE_H) Bigcheese wrote: I c

[clang] [HLSL] Implement the `lit` intrinsic (PR #134171)

2025-04-03 Thread Kaitlin Peng via cfe-commits
https://github.com/kmpeng edited https://github.com/llvm/llvm-project/pull/134171 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement the `lit` intrinsic (PR #134171)

2025-04-03 Thread Deric C. via cfe-commits
@@ -101,6 +101,16 @@ constexpr vector smoothstep_vec_impl(vector Min, vector Max, #endif } +template constexpr vector lit_impl(T NDotL, T NDotH, T M) { + bool DiffuseCond = NDotL < 0; + T Diffuse = select(DiffuseCond, 0, NDotL); + vector Result = {1, Diffuse, 0, 1}; + bo

[clang] [clang] [sanitizer] predict trap checks succeed (PR #134310)

2025-04-03 Thread Florian Mayer via cfe-commits
https://github.com/fmayer created https://github.com/llvm/llvm-project/pull/134310 This will improve performance, because the trap checks fail at most once (when the program crashes). >From 44f9ccd6b4104fb07ad9cf9581c41c6d473525ec Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Thu, 3 Apr

[clang] [HLSL] Implement the `lit` intrinsic (PR #134171)

2025-04-03 Thread Deric C. via cfe-commits
@@ -253,6 +253,37 @@ const inline float length(__detail::HLSL_FIXED_VECTOR X) { return __detail::length_vec_impl(X); } +//===--===// +// lit builtins +//===--

[clang] 73e8d67 - Revert "[HLSL][RootSignature] Define and integrate `HLSLRootSignatureAttr`" (#134273)

2025-04-03 Thread via cfe-commits
Author: Finn Plummer Date: 2025-04-03T09:40:50-07:00 New Revision: 73e8d67a200beaa554a72cdd50e4d1a5a55caf69 URL: https://github.com/llvm/llvm-project/commit/73e8d67a200beaa554a72cdd50e4d1a5a55caf69 DIFF: https://github.com/llvm/llvm-project/commit/73e8d67a200beaa554a72cdd50e4d1a5a55caf69.diff

[clang] [HLSL] Implement the `lit` intrinsic (PR #134171)

2025-04-03 Thread Deric C. via cfe-commits
@@ -22,10 +22,10 @@ // HLSL standard library function declarations/definitions. #include "hlsl/hlsl_alias_intrinsics.h" +#include "hlsl/hlsl_intrinsics.h" #if __HLSL_VERSION <= __HLSL_202x #include "hlsl/hlsl_compat_overloads.h" #endif -#include "hlsl/hlsl_intrinsics.h" ---

[clang] 506630d - [clang][deps] Avoid unchecked error assertion (#134284)

2025-04-03 Thread via cfe-commits
Author: Jan Svoboda Date: 2025-04-03T14:57:06-07:00 New Revision: 506630d6db7c848f8943fff752039b9e1c91cb63 URL: https://github.com/llvm/llvm-project/commit/506630d6db7c848f8943fff752039b9e1c91cb63 DIFF: https://github.com/llvm/llvm-project/commit/506630d6db7c848f8943fff752039b9e1c91cb63.diff L

[clang] [HLSL] Implement the `lit` intrinsic (PR #134171)

2025-04-03 Thread Deric C. via cfe-commits
https://github.com/Icohedron edited https://github.com/llvm/llvm-project/pull/134171 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement the `lit` intrinsic (PR #134171)

2025-04-03 Thread Deric C. via cfe-commits
https://github.com/Icohedron edited https://github.com/llvm/llvm-project/pull/134171 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement the `lit` intrinsic (PR #134171)

2025-04-03 Thread Kaitlin Peng via cfe-commits
https://github.com/kmpeng edited https://github.com/llvm/llvm-project/pull/134171 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WIP] Implement `print-deserialized-declarations` flag to dump source… (PR #133910)

2025-04-03 Thread Viktoriia Bakalova via cfe-commits
https://github.com/VitaNuo edited https://github.com/llvm/llvm-project/pull/133910 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] do not diagnose array types within implicit instantiations of a template (PR #132924)

2025-04-03 Thread St. Muench via cfe-commits
stmuench wrote: Ping https://github.com/llvm/llvm-project/pull/132924 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [flang-rt] Pass the whole path of libflang_rt.runtime.a to linker on AIX and LoP (PR #131041)

2025-04-03 Thread Daniel Chen via cfe-commits
DanielCChen wrote: Still fail at the same `ppc64le-unknown-linux-gnu` target? The reason I am asking is that I was able to reproduce the failure at line 44. `! BSD-SAME: -lexecinfo` https://github.com/llvm/llvm-project/pull/131041 ___ cfe-commits mai

[clang] [HLSL] Implement the `lit` intrinsic (PR #134171)

2025-04-03 Thread Kaitlin Peng via cfe-commits
https://github.com/kmpeng deleted https://github.com/llvm/llvm-project/pull/134171 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement the `lit` intrinsic (PR #134171)

2025-04-03 Thread Kaitlin Peng via cfe-commits
@@ -280,6 +280,22 @@ constexpr bool4 isinf(double4 V) { return isinf((float4)V); } _DXC_COMPAT_TERNARY_DOUBLE_OVERLOADS(lerp) _DXC_COMPAT_TERNARY_INTEGER_OVERLOADS(lerp) +//===--===// +// lit builtins overloa

[clang] [Clang][OpenCL][AMDGPU] Allow a kernel to call another kernel (PR #115821)

2025-04-03 Thread Matt Arsenault via cfe-commits
@@ -6138,6 +6150,7 @@ void CodeGenModule::EmitGlobalFunctionDefinition(GlobalDecl GD, CodeGenFunction(*this).GenerateCode(GD, Fn, FI); setNonAliasAttributes(GD, Fn); + arsenm wrote: ```suggestion ``` https://github.com/llvm/llvm-project/pull/115821

[clang] [CIR] Upstream support for address of and dereference (PR #134317)

2025-04-03 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/134317 This adds support for handling the address of and dereference unary operations in ClangIR code generation. This also adds handling for nullptr and proper initialization via the NullToPointer cast. >From d13

[clang] [CIR] Upstream support for address of and dereference (PR #134317)

2025-04-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Andy Kaylor (andykaylor) Changes This adds support for handling the address of and dereference unary operations in ClangIR code generation. This also adds handling for nullptr and proper initialization via the NullToPointer cast. --- Pa

[clang] [llvm] [HLSL] Implement dot2add intrinsic (PR #131237)

2025-04-03 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl approved this pull request. LGTM, please address Finn’s requests before merging. https://github.com/llvm/llvm-project/pull/131237 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

[clang] [CIR] Upstream support for address of and dereference (PR #134317)

2025-04-03 Thread Andy Kaylor via cfe-commits
andykaylor wrote: @mmha https://github.com/llvm/llvm-project/pull/134317 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Add clang driver changes to support MTI RISC-V (PR #134065)

2025-04-03 Thread Paul Kirth via cfe-commits
@@ -424,8 +432,19 @@ std::string Linux::computeSysRoot() const { const StringRef InstallDir = GCCInstallation.getInstallPath(); const StringRef TripleStr = GCCInstallation.getTriple().str(); const Multilib &Multilib = GCCInstallation.getMultilib(); + std::string Path; +

[clang] bd197ca - [clang][modules] Determine if the SDK supports builtin modules independent of the target (#134005)

2025-04-03 Thread via cfe-commits
Author: Ian Anderson Date: 2025-04-03T16:09:57-07:00 New Revision: bd197ca00365cd35002792324bd149f71e864e1a URL: https://github.com/llvm/llvm-project/commit/bd197ca00365cd35002792324bd149f71e864e1a DIFF: https://github.com/llvm/llvm-project/commit/bd197ca00365cd35002792324bd149f71e864e1a.diff

[clang] [clang][modules] Determine if the SDK supports builtin modules independent of the target (PR #134005)

2025-04-03 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder closed https://github.com/llvm/llvm-project/pull/134005 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Hlsl dst function (PR #133828)

2025-04-03 Thread via cfe-commits
https://github.com/metkarpoonam updated https://github.com/llvm/llvm-project/pull/133828 >From 3a45246453d120da108e597d23da0fb8d9df0b1b Mon Sep 17 00:00:00 2001 From: Poonam Vilas Metkar Date: Mon, 31 Mar 2025 16:49:18 -0700 Subject: [PATCH 1/8] Implement a dst function with test cases for HLSL

[clang] [llvm] [clang][IR] Overload @llvm.thread.pointer to support non-AS0 targets (PR #132489)

2025-04-03 Thread Jessica Clarke via cfe-commits
jrtc27 wrote: > I think you also need to fix the backends so if they see thread_pointer > intrinsic with the wrong address-space, they don't crash. I don't believe they do crash? At least, I can't construct IR using any addrspace (even some of the special X86 ones) that makes amd64/aarch64/ris

[clang] [C11] Implement WG14 N1285 (temporary lifetimes) (PR #133472)

2025-04-03 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/133472 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format]: Add `Custom` to `ShortFunctionStyle`; add new AllowShortFunctionsOnASingleLineOptions for granular setup (PR #134337)

2025-04-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Ivan (irymarchyk) Changes The current clang-format configuration option AllowShortFunctionsOnASingleLine  uses a single enum (ShortFunctionStyle) to control when short function definitions can be merged onto a single line. This enum

[clang] [AArch64] Remove strict checks from init-aarch64.c (PR #134338)

2025-04-03 Thread Madhur Amilkanthwar via cfe-commits
https://github.com/madhur13490 created https://github.com/llvm/llvm-project/pull/134338 The checks in init-aarch64.c expect macros to be back-to-back which seems very strict. This change aims to relax this and use just AARCH64 instead of AARCH64-NEXT. This way, we maintain the order of the mac

[clang] [llvm] [llvm][clang] Allocate a new stack instead of spawning a new thread to get more stack space (PR #133173)

2025-04-03 Thread Michael Spencer via cfe-commits
@@ -0,0 +1,115 @@ +//===--- RunOnNewStack.cpp - Crash Recovery ---===// +// +// 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: Ap

[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2025-04-03 Thread Jonas Paulsson via cfe-commits
@@ -87,6 +90,15 @@ define <2 x double> @f7(<2 x double> %dummy, <2 x double> %val1, ret <2 x double> %ret } +; Test the fminh library function. +define half @f11_half(half %dummy, half %val1, half %val2) { +; CHECK-LABEL: f11_half: +; CHECK: %r14, fminh@PLT

[clang] [clang-format]: Add `Custom` to `ShortFunctionStyle`; add new AllowShortFunctionsOnASingleLineOptions for granular setup (PR #134337)

2025-04-03 Thread via cfe-commits
https://github.com/irymarchyk created https://github.com/llvm/llvm-project/pull/134337 The current clang-format configuration option AllowShortFunctionsOnASingleLine  uses a single enum (ShortFunctionStyle) to control when short function definitions can be merged onto a single line. This enum p

[clang] [clang-format]: Add `Custom` to `ShortFunctionStyle`; add new AllowShortFunctionsOnASingleLineOptions for granular setup (PR #134337)

2025-04-03 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] [AArch64] Remove strict checks from init-aarch64.c (PR #134338)

2025-04-03 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm requested changes to this pull request. The other tests should be strengthened to always use -NEXT. The exact set of macros should be tested, don't want others hiding in the gaps https://github.com/llvm/llvm-project/pull/134338

[clang] [clang] [sanitizer] predict trap checks succeed (PR #134310)

2025-04-03 Thread Thurston Dang via cfe-commits
thurstond wrote: > Trap checks fail at most once (when the program crashes). It's technically possible to have a signal handler that consumes SIGILL and then jumps over the offending instruction. The UBSan docs allude to this: "-fsanitize-trap=...: execute a trap instruction (doesn’t require U

[clang] [Driver] Generalize the `addFortranRuntimeLibs` function in `PPCLinux.cpp` to all Linux platform. (PR #134297)

2025-04-03 Thread Daniel Chen via cfe-commits
https://github.com/DanielCChen created https://github.com/llvm/llvm-project/pull/134297 As suggested in PR #131041, this PR moves the code of `addFortranRuntimeLibs` from `PPCLinux.cpp` to `Gnu.cpp` to generalize it for all Linux platform. >From a7c791a7fe3a0606fc6b79368b32d599bdfbe2fb Mon Sep

[clang] [AArch64] Remove strict checks from init-aarch64.c (PR #134338)

2025-04-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Madhur Amilkanthwar (madhur13490) Changes The checks in init-aarch64.c expect macros to be back-to-back which seems very strict. This change aims to relax this and use just AARCH64 instead of AARCH64-NEXT. This way, we maintain the order

[clang] [clang-format]: Add `StaticInlineOnly` and `StaticInline` options to `ShortFunctionStyle` (PR #133598)

2025-04-03 Thread via cfe-commits
https://github.com/irymarchyk converted_to_draft https://github.com/llvm/llvm-project/pull/133598 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement the `lit` intrinsic (PR #134171)

2025-04-03 Thread Kaitlin Peng via cfe-commits
https://github.com/kmpeng updated https://github.com/llvm/llvm-project/pull/134171 >From 719bb94279f64f134c826faa22898e4e549bb23c Mon Sep 17 00:00:00 2001 From: kmpeng Date: Thu, 27 Mar 2025 14:39:27 -0700 Subject: [PATCH 1/7] finished lit implementation, added codegen and sema tests --- .../

[clang-tools-extra] [NFC] Fixes proposed by code sanitizer. (PR #134138)

2025-04-03 Thread Nicolas van Kempen via cfe-commits
@@ -535,7 +535,7 @@ struct FragmentCompiler { } if (Filters->empty()) return std::nullopt; -auto Filter = [Filters](llvm::StringRef Path) { +auto Filter = [Filters = std::move(Filters)](llvm::StringRef Path) { nicovank wrote: Line 520: th

[clang-tools-extra] [NFC] Fixes proposed by code sanitizer. (PR #134138)

2025-04-03 Thread Nicolas van Kempen via cfe-commits
@@ -535,7 +535,7 @@ struct FragmentCompiler { } if (Filters->empty()) return std::nullopt; -auto Filter = [Filters](llvm::StringRef Path) { +auto Filter = [Filters = std::move(Filters)](llvm::StringRef Path) { for (auto &Regex : *Filters) --

[clang-tools-extra] [clang-tidy] Improve integer comparison by matching valid expressions outside implicitCastExpr (PR #134188)

2025-04-03 Thread David Rivera via cfe-commits
https://github.com/RiverDave edited https://github.com/llvm/llvm-project/pull/134188 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][deps] Avoid unchecked error assertion (PR #134284)

2025-04-03 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 closed https://github.com/llvm/llvm-project/pull/134284 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement the `lit` intrinsic (PR #134171)

2025-04-03 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/134171 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][deps] Avoid unchecked error assertion (PR #134284)

2025-04-03 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir approved this pull request. https://github.com/llvm/llvm-project/pull/134284 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement the `lit` intrinsic (PR #134171)

2025-04-03 Thread Kaitlin Peng via cfe-commits
@@ -253,6 +253,37 @@ const inline float length(__detail::HLSL_FIXED_VECTOR X) { return __detail::length_vec_impl(X); } +//===--===// +// lit builtins +//===--

[clang] [flang] [llvm] [flang-rt] Pass the whole path of libflang_rt.runtime.a to linker on AIX and LoP (PR #131041)

2025-04-03 Thread Daniel Chen via cfe-commits
DanielCChen wrote: @klausler It seems it passes for me on LoP after I pull the latest source. Could you please try again and see if you still run into the failure? ``` -- Testing: 1 tests, 1 workers -- PASS: Flang :: Driver/linker-flags.f90 (1 of 1) Exit Code: 0 Command Output (stderr): -- /sc

[clang] [HLSL] Implement the `lit` intrinsic (PR #134171)

2025-04-03 Thread Kaitlin Peng via cfe-commits
@@ -0,0 +1,36 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple dxil-pc-shadermodel6.3-library %s -fnative-half-type -emit-llvm -O1 -o - | FileCheck %s + +// CHECK

[clang] [HLSL] Implement the `lit` intrinsic (PR #134171)

2025-04-03 Thread Deric C. via cfe-commits
@@ -101,6 +101,16 @@ constexpr vector smoothstep_vec_impl(vector Min, vector Max, #endif } +template constexpr vector lit_impl(T NDotL, T NDotH, T M) { + bool DiffuseCond = NDotL < 0; + T Diffuse = select(DiffuseCond, 0, NDotL); + vector Result = {1, Diffuse, 0, 1}; + bo

<    1   2   3   4   5   >