[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] [HLSL] Implement the `lit` intrinsic (PR #134171)

2025-04-03 Thread Deric C. via cfe-commits
https://github.com/Icohedron 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 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] [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] 996cf5d - [HLSL] Implement dot2add intrinsic (#131237)

2025-04-03 Thread via cfe-commits
Author: Sumit Agarwal Date: 2025-04-03T16:23:09-06:00 New Revision: 996cf5dc6731d00da6ce5dc7a25b399d0ed29d54 URL: https://github.com/llvm/llvm-project/commit/996cf5dc6731d00da6ce5dc7a25b399d0ed29d54 DIFF: https://github.com/llvm/llvm-project/commit/996cf5dc6731d00da6ce5dc7a25b399d0ed29d54.diff

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

2025-04-03 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/134284 None >From c333f2bd8dc4ae9497f7def29d3f3989f309a991 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Thu, 3 Apr 2025 10:37:34 -0700 Subject: [PATCH] [clang][deps] Avoid unchecked error assertion --- clan

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

2025-04-03 Thread via cfe-commits
github-actions[bot] wrote: @sumitsays 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 buil

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

2025-04-03 Thread Ashley Coleman via cfe-commits
https://github.com/V-FEXrt closed 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] [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 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] [llvm] [HLSL][SPIR-V] Add hlsl_private address space for SPIR-V (PR #133464)

2025-04-03 Thread Steven Perron via cfe-commits
Nathan =?utf-8?q?Gau=C3=ABr?= , Nathan =?utf-8?q?Gau=C3=ABr?= Message-ID: In-Reply-To: https://github.com/s-perron approved this pull request. https://github.com/llvm/llvm-project/pull/133464 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[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] 13aac46 - [clang][NFC] Refactor CodeGen's hasBooleanRepresentation (#134159)

2025-04-03 Thread via cfe-commits
Author: Andy Kaylor Date: 2025-04-03T14:03:25-07:00 New Revision: 13aac46332f607a38067b5ddd466071683b8c255 URL: https://github.com/llvm/llvm-project/commit/13aac46332f607a38067b5ddd466071683b8c255 DIFF: https://github.com/llvm/llvm-project/commit/13aac46332f607a38067b5ddd466071683b8c255.diff L

[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 `llvm-clang-x86_64-gcc-ubuntu-no-asserts` running on `doug-worker-6` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/202/builds/433

[clang] fixed clang frontend crash with friend class declaration and overload == (PR #133878)

2025-04-03 Thread Ankur Ahir via cfe-commits
https://github.com/Ankur-0429 reopened https://github.com/llvm/llvm-project/pull/133878 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-04-03 Thread Jonas Paulsson via cfe-commits
@@ -0,0 +1,65 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5 +; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=zEC12 -verify-machineinstrs \ +; RUN: | FileCheck %s --check-prefix=NOVEC +; RUN: llc < %s -mtriple=s390x-linux-

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

2025-04-03 Thread Kaitlin Peng 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-tools-extra] [clang-tidy] Improve integer comparison by matching valid expressions outside implicitCastExpr (PR #134188)

2025-04-03 Thread via cfe-commits
@@ -177,6 +177,10 @@ Changes in existing checks matched scenarios of ``find`` and ``rfind`` methods and fixing false positives when those methods were called with 3 arguments. +- Improved :doc:`modernize-use-integer-sign-comparison EugeneZelenko wrote: Pl

[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 `amdgpu-offload-rhel-8-cmake-build-only` running on `rocm-docker-rhel-8` while building `clang` at step 4 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/204/builds/5427 Here is the releva

[clang] [llvm] [HLSL] Run finalize linkage pass for all targets (PR #134260)

2025-04-03 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic commented: I'm not sure I understand why we're changing the linkage of functions in an IR pass, instead of just setting the correct linkage in the first place. Is there some form of linker involved? If there is, should the linker fix the linkage? By conventio

[clang] [CIR] Upstream support for break and continue statements (PR #134181)

2025-04-03 Thread Erich Keane via cfe-commits
@@ -265,3 +265,125 @@ void test_empty_while_true() { // OGCG: br label %[[WHILE_BODY:.*]] // OGCG: [[WHILE_BODY]]: // OGCG: ret void + +void unreachable_after_continue() { + for (;;) { +continue; +int x = 1; + } +} + +// CIR: cir.func @unreachable_after_continue +

[clang] [Driver] Add linker options to support statical linking to shared flang-rt on AIX. (PR #131822)

2025-04-03 Thread Daniel Chen via cfe-commits
DanielCChen wrote: After further internal discussion. we decided to withdraw this PR until we hash out a few more details. Thanks everyone for the comments. https://github.com/llvm/llvm-project/pull/131822 ___ cfe-commits mailing list cfe-commits@list

[clang] [Driver] Add linker options to support statical linking to shared flang-rt on AIX. (PR #131822)

2025-04-03 Thread Daniel Chen via cfe-commits
https://github.com/DanielCChen closed https://github.com/llvm/llvm-project/pull/131822 ___ 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 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/2] [NFC] Fixes proposed by code sanitizer. --- .../bugp

[clang] [clang][NFC] Refactor CodeGen's hasBooleanRepresentation (PR #134159)

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

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

2025-04-03 Thread Arvind Sudarsanam via cfe-commits
asudarsa wrote: For the test failures, please resync with the tip of the repo and the test failure should disappear. https://github.com/llvm/llvm-project/pull/133194 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[clang] [CIR] Upstream support for break and continue statements (PR #134181)

2025-04-03 Thread Bruno Cardoso Lopes via cfe-commits
@@ -265,3 +265,125 @@ void test_empty_while_true() { // OGCG: br label %[[WHILE_BODY:.*]] // OGCG: [[WHILE_BODY]]: // OGCG: ret void + +void unreachable_after_continue() { + for (;;) { +continue; +int x = 1; + } +} + +// CIR: cir.func @unreachable_after_continue +

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

2025-04-03 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. LGTM 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] [CIR] Upstream support for promoted types with unary plus/minus (PR #133829)

2025-04-03 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited https://github.com/llvm/llvm-project/pull/133829 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[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: > > as a must have, it allows featureful AMDGCN flavoured SPIR-V to be > > produced, where target specific capability is guarded and chosen or > > discarded when finalising compilation for a concrete target. > > I understand the reasoning behind providing such mechanisms to guar

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

2025-04-03 Thread Farzon Lotfi via cfe-commits
farzonl wrote: > > Please run clang format > > Ran it and it didn't modify any files. > You have 19 commits head one isn’t going to help. Type git log and pick the commit id before you your 19 commits the run `git clang-format ` https://github.com/llvm/llvm-project/pull/131237 __

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

2025-04-03 Thread Andy Kaylor via cfe-commits
@@ -1320,7 +1322,7 @@ mlir::Value ScalarExprEmitter::VisitCastExpr(CastExpr *ce) { "fixed point casts"); return {}; } -cgf.getCIRGenModule().errorNYI(subExpr->getSourceRange(), "fp options"); +assert(!cir::MissingFeatures:

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

2025-04-03 Thread Zahira Ammarguellat 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-tools-extra] [NFC] Fixes proposed by code sanitizer. (PR #134138)

2025-04-03 Thread Zahira Ammarguellat via cfe-commits
zahiraam wrote: > 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. Please see above the error message from sanitizer. I can revert the change if you think the do

[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/4] [NFC] Fixes proposed by code sanitizer. --- .../bugp

[clang] [CLANG-CL] ignores wpadded (PR #130182)

2025-04-03 Thread Eli Friedman via cfe-commits
=?utf-8?q?Théo?= De Magalhaes , =?utf-8?q?Théo?= De Magalhaes , =?utf-8?q?Théo?= De Magalhaes , =?utf-8?q?Théo?= De Magalhaes , =?utf-8?q?Théo?= De Magalhaes , =?utf-8?q?Théo?= De Magalhaes , =?utf-8?q?Théo?= De Magalhaes , =?utf-8?q?Théo?= De Magalhaes Message-ID: In-Reply-To: efriedma-quic wr

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

2025-04-03 Thread Eli Friedman 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 Peter Klausler via cfe-commits
klausler wrote: ``` FAIL: Flang :: Driver/linker-flags.f90 (1 of 3430) TEST 'Flang :: Driver/linker-flags.f90' FAILED Exit Code: 1 Command Output (stderr): -- /home/pklausler/llvm-project/build/x86/gcc/9.3.0/Release/shared/bin/flang -### --target=ppc64

[clang] [compiler-rt] [llvm] [ASan] Add metadata to renamed instructions so ASan doesn't use the i… (PR #119387)

2025-04-03 Thread Aaron Puchert via cfe-commits
aaronpuchert wrote: Maybe the test needs to be relaxed a bit because of stack layout differences in other OS targets? Although I'm not sure why they're different. See https://lab.llvm.org/buildbot/#/builders/186/builds/7896: ``` TEST 'AddressSanitizer-arm-android :: TestCa

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

2025-04-03 Thread Trevor Gross via cfe-commits
@@ -126,3 +138,23 @@ define void @f9(ptr %cptr, ptr %aptr, ptr %bptr) { store fp128 %c, ptr %cptr ret void } + +; Test f16 copies in which the sign comes from an f16. +define half @f10(half %a, half %b) { +; CHECK-LABEL: f10: +; CHECK: brasl %r14, copysignh@PLT

[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/9] finished lit implementation, added codegen and sema tests --- .../

[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-tools-extra] [llvm] [llvm] add tool to verify mustache library (PR #111487)

2025-04-03 Thread Paul Kirth via cfe-commits
ilovepi wrote: ah, right. I forgot we build things under `utils` that's a much better place for this. Overall the patch is much better. Once it's moved to `utils` I think it will be good. @nikic I seem to recall that we now prefer markdown over `.rst` files. Is that correct? I tried to find

[clang] [CIR] Upstream support for break and continue statements (PR #134181)

2025-04-03 Thread Erich Keane via cfe-commits
@@ -265,3 +265,125 @@ void test_empty_while_true() { // OGCG: br label %[[WHILE_BODY:.*]] // OGCG: [[WHILE_BODY]]: // OGCG: ret void + +void unreachable_after_continue() { + for (;;) { +continue; +int x = 1; + } +} + +// CIR: cir.func @unreachable_after_continue +

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

2025-04-03 Thread Sarah Spall 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] [WIP] Implement `print-deserialized-declarations` flag to dump source… (PR #133910)

2025-04-03 Thread Viktoriia Bakalova via cfe-commits
@@ -49,6 +51,135 @@ LLVM_INSTANTIATE_REGISTRY(FrontendPluginRegistry) namespace { +/// Dumps deserialized declarations. VitaNuo wrote: > If you want, you might use a comment to explain other non-trivial details, > though, e.g. how the class must be used or

[clang] [HIP] Claim `--offload-compress` for `-M` (PR #133456)

2025-04-03 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu closed https://github.com/llvm/llvm-project/pull/133456 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-04-03 Thread Florian Mayer via cfe-commits
https://github.com/fmayer updated https://github.com/llvm/llvm-project/pull/134310 >From 44f9ccd6b4104fb07ad9cf9581c41c6d473525ec Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Thu, 3 Apr 2025 14:53:29 -0700 Subject: [PATCH 1/5] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UTF

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

2025-04-03 Thread Florian Mayer via cfe-commits
https://github.com/fmayer updated https://github.com/llvm/llvm-project/pull/134310 >From 44f9ccd6b4104fb07ad9cf9581c41c6d473525ec Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Thu, 3 Apr 2025 14:53:29 -0700 Subject: [PATCH 1/4] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UTF

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

2025-04-03 Thread Florian Mayer via cfe-commits
https://github.com/fmayer updated https://github.com/llvm/llvm-project/pull/134310 >From 44f9ccd6b4104fb07ad9cf9581c41c6d473525ec Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Thu, 3 Apr 2025 14:53:29 -0700 Subject: [PATCH 1/6] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UTF

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

2025-04-03 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi approved this pull request. Since this just moves common code I think this is fine for now. We should revisit some of the interfaces though, especially the ones that return SmallString<128>. I think there is also a Path API that handles relative paths, so we can per

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

2025-04-03 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,25 @@ +//===-- File.h --- File Helpers ---*- 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: Apache-2.0 WITH LLV

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

2025-04-03 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi edited https://github.com/llvm/llvm-project/pull/134298 ___ 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-x86_64-debian-dylib` running on `gribozavr4` while building `clang` at step 5 "build-unified-tree". Full details are available at: https://lab.llvm.org/buildbot/#/builders/60/builds/23834 Here is the relevant piece of t

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

2025-04-03 Thread Farzon Lotfi 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-tools-extra] [clang-doc][NFC] refactor out file helpers (PR #134298)

2025-04-03 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,25 @@ +//===-- File.h --- File Helpers ---*- 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: Apache-2.0 WITH LLV

[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: Seems PR #134320 is fixing this. https://github.com/llvm/llvm-project/pull/131041 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream support for break and continue statements (PR #134181)

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,h -- clang/include/clang/CIR/Dialect/Builder/CIRBaseBuil

[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
ian-twilightcoder wrote: > LGTM. I was a bit worried about the fallout that other target triples using > the same sdks would now opt into this behavior but if that were the case > they'd already be running into modularization errors (e.g. > `found_incompatible_headers__check_search_paths`) Ot

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

2025-04-03 Thread Jorge Gorbe Moya via cfe-commits
@@ -0,0 +1,3329 @@ +// RUN: %clang_cc1 -triple nvptx-unknown-unknown -fcuda-is-device -O3 -o - %s -emit-llvm | FileCheck %s +// RUN: %clang_cc1 -triple nvptx64-unknown-unknown -fcuda-is-device -O3 -o - %s -emit-llvm | FileCheck %s +#include "../Headers/Inputs/include/cuda.h" ---

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

2025-04-03 Thread Austin Schuh via cfe-commits
@@ -0,0 +1,3329 @@ +// RUN: %clang_cc1 -triple nvptx-unknown-unknown -fcuda-is-device -O3 -o - %s -emit-llvm | FileCheck %s +// RUN: %clang_cc1 -triple nvptx64-unknown-unknown -fcuda-is-device -O3 -o - %s -emit-llvm | FileCheck %s +#include "../Headers/Inputs/include/cuda.h" ---

[clang] [X86][AVX10.2] Replace nepbh with bf16 to match with others, NFCI (PR #134240)

2025-04-03 Thread Evgenii Kudriashov via cfe-commits
https://github.com/e-kud approved this pull request. LGTM. Looks like the last nep. https://github.com/llvm/llvm-project/pull/134240 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-04-03 Thread Akshay Deodhar 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] [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] NFC: introduce UnsignedOrNone as a replacement for std::optional (PR #134142)

2025-04-03 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov closed https://github.com/llvm/llvm-project/pull/134142 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Run finalize linkage pass for all targets (PR #134260)

2025-04-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-directx Author: Steven Perron (s-perron) Changes HLSL has three levels of visibility for functions. See section 3.6 of the [HLSL spec](https://microsoft.github.io/hlsl-specs/specs/hlsl.pdf) for details. 1. Functions marked `static` have internal

[clang] [llvm] [ARM][Clang] Make `+nosimd` functional for AArch32 Targets (PR #130623)

2025-04-03 Thread David Green via cfe-commits
@@ -679,20 +679,18 @@ llvm::ARM::FPUKind arm::getARMTargetFeatures(const Driver &D, CPUArgFPUKind != llvm::ARM::FK_INVALID ? CPUArgFPUKind : ArchArgFPUKind; (void)llvm::ARM::getFPUFeatures(FPUKind, Features); } else { -bool Generic = true; -if (!ForAS) {

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

2025-04-03 Thread Farzon Lotfi 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] [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] [clang][modules] Lazily load by name lookups in module maps (PR #132853)

2025-04-03 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese updated https://github.com/llvm/llvm-project/pull/132853 >From d19d7c6314dbb68abfe7cdceebd8e8f65aedddc5 Mon Sep 17 00:00:00 2001 From: Michael Spencer Date: Wed, 29 Jan 2025 12:49:29 -0800 Subject: [PATCH] [clang][modules] Lazily load by name lookups in module maps

[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
https://github.com/Bigcheese updated https://github.com/llvm/llvm-project/pull/133173 >From cc251995b3d55b3cd76b0b65753be88c9fb9d627 Mon Sep 17 00:00:00 2001 From: Michael Spencer Date: Wed, 26 Mar 2025 14:48:19 -0700 Subject: [PATCH] [llvm][clang] Allocate a new stack instead of spawning a new

[clang] [llvm] [clang][modules] Lazily load by name lookups in module maps (PR #132853)

2025-04-03 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese updated https://github.com/llvm/llvm-project/pull/132853 >From d19d7c6314dbb68abfe7cdceebd8e8f65aedddc5 Mon Sep 17 00:00:00 2001 From: Michael Spencer Date: Wed, 29 Jan 2025 12:49:29 -0800 Subject: [PATCH 1/2] [clang][modules] Lazily load by name lookups in module

[clang] [CIR] Upstream support for break and continue statements (PR #134181)

2025-04-03 Thread Erich Keane via cfe-commits
@@ -569,6 +569,36 @@ def YieldOp : CIR_Op<"yield", [ReturnLike, Terminator, ]; } +//===--===// +// BreakOp +//===--===// + +def BreakOp : C

[clang] [CIR] Upstream support for break and continue statements (PR #134181)

2025-04-03 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. 1 Possible nit, else LGTM. https://github.com/llvm/llvm-project/pull/134181 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-04-03 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. 1 concern, else lgtm. 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] [CIR] Upstream support for address of and dereference (PR #134317)

2025-04-03 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited 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] [CIR] Upstream support for logical not operations (PR #133966)

2025-04-03 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. Thanks for looking into that! That makes sense. LGTM. https://github.com/llvm/llvm-project/pull/133966 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[clang] [clang][doc]: Merge the contents of identical entries. (PR #134089)

2025-04-03 Thread via cfe-commits
YLChenZ wrote: Hi @AaronBallman, bothering you again. I have a doubt about the merge of the following case: ![屏幕截图 2025-04-04 081652](https://github.com/user-attachments/assets/ce592ae1-b02a-45bf-aece-55e3a175a01f) There is a lot of content that is `No documentation`, and to merge these entri

[clang] [CIR] Upstream support for break and continue statements (PR #134181)

2025-04-03 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/134181 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add if statement support (PR #134333)

2025-04-03 Thread via cfe-commits
https://github.com/Andres-Salamanca created https://github.com/llvm/llvm-project/pull/134333 This patch adds support for if statements in the CIR dialect Additionally, multiple RUN lines were introduced to improve codegen test coverage >From 89f0f528f981223273b2c1548c9a71f2ceeca329 Mon Sep 17

[clang] [CIR] Add if statement support (PR #134333)

2025-04-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: None (Andres-Salamanca) Changes This patch adds support for if statements in the CIR dialect Additionally, multiple RUN lines were introduced to improve codegen test coverage --- Patch is 43.50 KiB, truncated to 20.00 KiB below, full v

[clang] [CIR] Add if statement support (PR #134333)

2025-04-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (Andres-Salamanca) Changes This patch adds support for if statements in the CIR dialect Additionally, multiple RUN lines were introduced to improve codegen test coverage --- Patch is 43.50 KiB, truncated to 20.00 KiB below, full ver

[clang] [CIR] Add if statement support (PR #134333)

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] [CIR] Upstream support for address of and dereference (PR #134317)

2025-04-03 Thread Eli Friedman via cfe-commits
@@ -193,8 +334,23 @@ LValue CIRGenFunction::emitUnaryOpLValue(const UnaryOperator *e) { switch (op) { case UO_Deref: { -cgm.errorNYI(e->getSourceRange(), "UnaryOp dereference"); -return LValue(); +QualType t = e->getSubExpr()->getType()->getPointeeType(); +

[clang] [CIR] Add if statement support (PR #134333)

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

[clang] 4088c70 - CGHLSLBuiltins.cpp: Suppress a warning in #131237 [-Wunused-variable]

2025-04-03 Thread NAKAMURA Takumi via cfe-commits
Author: NAKAMURA Takumi Date: 2025-04-04T11:05:46+09:00 New Revision: 4088c70f4e7eae0bfc2916cc88c7301ec5e19daf URL: https://github.com/llvm/llvm-project/commit/4088c70f4e7eae0bfc2916cc88c7301ec5e19daf DIFF: https://github.com/llvm/llvm-project/commit/4088c70f4e7eae0bfc2916cc88c7301ec5e19daf.dif

[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] [CIR] Upstream support for break and continue statements (PR #134181)

2025-04-03 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/134181 >From 54454e4d52570f29c493c41fc9bf95cbaf9e0886 Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Fri, 21 Mar 2025 09:46:27 -0700 Subject: [PATCH 1/3] [CIR] Upstream support for break and continue statements T

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

2025-04-03 Thread Florian Mayer via cfe-commits
https://github.com/fmayer ready_for_review https://github.com/llvm/llvm-project/pull/134310 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][NVVM] Support `-f[no-]cuda-prec-sqrt` and propagate precision flag to `NVVMReflect` (PR #134244)

2025-04-03 Thread via cfe-commits
Lai-YT wrote: > Why is this a module flag, instead of a function attribute? The other value handled by the _NVVMReflect_ pass is `"__CUDA_FTZ"`, which Clang currently sets via a module flag. I followed the same approach here for consistency. Also, since the decision to use precise square root

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

2025-04-03 Thread Deric C. 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] [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-tools-extra] clangd: Add a build option to disable building dexp (PR #133124)

2025-04-03 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: @kraj, you approved this and you are a project member, are you comfortable merging this? If so, please go ahead. >From my point of view as a clangd maintainer, I'm supportive of having such an >option, but I have ~zero CMake knowledge, so if you think this needs more >re

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

2025-04-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-codegen Author: Florian Mayer (fmayer) Changes Trap checks fail at most once (when the program crashes). --- Patch is 22.09 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/13

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

2025-04-03 Thread Erich Keane via cfe-commits
@@ -25,6 +25,147 @@ using namespace clang; using namespace clang::CIRGen; using namespace cir; +/// Given an expression of pointer type, try to +/// derive a more accurate bound on the alignment of the pointer. +Address CIRGenFunction::emitPointerWithAlignment(const Expr *expr

[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-tools-extra] clangd: Add a build option to disable building dexp (PR #133124)

2025-04-03 Thread Khem Raj via cfe-commits
kraj wrote: > @kraj, you approved this and you are a project member, are you comfortable > merging this? If so, please go ahead. > > From my point of view as a clangd maintainer, I'm supportive of having such > an option, but I have ~zero CMake knowledge, so if you think this needs more > rev

[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 closed https://github.com/llvm/llvm-project/pull/134297 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-04-03 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida approved this pull request. LGTM. I was a bit worried about the fallout that other target triples using the same sdks would now opt into this behavior but if that were the case they'd already be running into modularization errors (e.g. `found_incompatible_headers

<    1   2   3   4   5   >