[clang] [flang] [llvm] [AMDGPU] Add "lds-buffer-load-insts" attribute for all targets < gfx11 (PR #133055)

2025-03-26 Thread Juan Manuel Martinez CaamaƱo via cfe-commits
https://github.com/jmmartinez updated https://github.com/llvm/llvm-project/pull/133055 From eae04b28a010045bdd7fcd03f84c952abeed3ff6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20Martinez=20Caama=C3=B1o?= Date: Thu, 20 Mar 2025 13:23:25 +0100 Subject: [PATCH 1/2] [AMDGPU] Add "lds-bu

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

2025-03-26 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] [HLSL] Add new int overloads for math builtins (PR #133162)

2025-03-26 Thread Chris B via cfe-commits
https://github.com/llvm-beanz approved this pull request. https://github.com/llvm/llvm-project/pull/133162 ___ 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-03-26 Thread Amr Hesham via cfe-commits
AmrDeveloper wrote: > I'm not suggesting errorNYI. I'm suggesting op.emitError(). We can't do that > here either, but maybe we could do it in the function from which this is > called? I think it's easier to keep it as assert, llvm_unreachable or a missing features as the error message mention

[clang] [PATCH] [clang][frontend] Fix AllocKind retrieving for `CXXConstructorDecl` refs #132794 (PR #133077)

2025-03-26 Thread Paul Schwabauer via cfe-commits
https://github.com/koplas updated https://github.com/llvm/llvm-project/pull/133077 >From 86033b4b698ad11cf358b929e950f0b01e50390e Mon Sep 17 00:00:00 2001 From: koplas Date: Wed, 26 Mar 2025 13:49:44 +0100 Subject: [PATCH] [PATCH] [clang][frontend] Fix AllocKind retrieval for CXXConstructorDec

[clang] [C23] Implement WG14 N3037 (PR #132939)

2025-03-26 Thread James Y Knight via cfe-commits
jyknight wrote: It seems to me that we could simplify the implementation by being a bit more literal in the interpretation of the requirements: look only at the type, alignment, name, and bitfield-width of members. Just don't bother checking other stuff I'd hope it can look more like a simple

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

2025-03-26 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/132974 >From 4dc1e77299c71b8f01fb73f7fba5f14e0fbe3edd Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 21 Mar 2025 21:07:11 +0100 Subject: [PATCH 1/5] [CIR] [Upstream local initialization for ArrayType ---

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

2025-03-26 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 8122bb9dbe39a1dde77eb4aad76bf1c0e70b2d89 a7f38496c6ae6686268f67cf1e884b7ed09470eb --e

[clang] [CIR] Upstream support for while and do..while loops (PR #133157)

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

[clang] [CIR] Upstream zero init for global variables (PR #133100)

2025-03-26 Thread Bruno Cardoso Lopes via cfe-commits
@@ -67,6 +67,40 @@ class CIRBaseBuilderTy : public mlir::OpBuilder { return create(loc, attr.getType(), attr); } + mlir::TypedAttr getConstNullPtrAttr(mlir::Type t) { +assert(mlir::isa(t) && "expected cir.ptr"); +return getConstPtrAttr(t, 0); + } + + mlir::Typ

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

2025-03-26 Thread Reid Kleckner via cfe-commits
https://github.com/rnk commented: If split stacks are negatively impacting profiling, debugging, or other compiler development tasks, I have to ask, have we considered optimizing clang stack usage? There are multiple issues: * Clang is a recursive descent parser. This isn't going to change, it

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

2025-03-26 Thread Reid Kleckner via cfe-commits
https://github.com/rnk edited https://github.com/llvm/llvm-project/pull/133173 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream CmpOp (PR #133159)

2025-03-26 Thread Andy Kaylor via cfe-commits
@@ -514,9 +515,17 @@ mlir::LogicalResult CIRToLLVMCastOpLowering::matchAndRewrite( assert(!MissingFeatures::cxxABI()); assert(!MissingFeatures::dataMemberType()); break; - case cir::CastKind::ptr_to_bool: -assert(!cir::MissingFeatures::opCmp()); + case cir::C

[clang] [CIR] Upstream CmpOp (PR #133159)

2025-03-26 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor commented: This looks really good. I have just a few minor comments and a request for more tests. https://github.com/llvm/llvm-project/pull/133159 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[clang] [CIR] Upstream CmpOp (PR #133159)

2025-03-26 Thread Andy Kaylor via cfe-commits
@@ -710,6 +710,89 @@ class ScalarExprEmitter : public StmtVisitor { HANDLEBINOP(Xor) HANDLEBINOP(Or) #undef HANDLEBINOP + + mlir::Value emitCmp(const BinaryOperator *e) { +mlir::Value result; +QualType lhsTy = e->getLHS()->getType(); +QualType rhsTy = e->getRH

[clang] [CIR] Upstream CmpOp (PR #133159)

2025-03-26 Thread Andy Kaylor via cfe-commits
@@ -710,6 +710,89 @@ class ScalarExprEmitter : public StmtVisitor { HANDLEBINOP(Xor) HANDLEBINOP(Or) #undef HANDLEBINOP + + mlir::Value emitCmp(const BinaryOperator *e) { +mlir::Value result; +QualType lhsTy = e->getLHS()->getType(); +QualType rhsTy = e->getRH

[clang] [CIR] Upstream CmpOp (PR #133159)

2025-03-26 Thread Andy Kaylor via cfe-commits
@@ -710,6 +710,89 @@ class ScalarExprEmitter : public StmtVisitor { HANDLEBINOP(Xor) HANDLEBINOP(Or) #undef HANDLEBINOP + + mlir::Value emitCmp(const BinaryOperator *e) { +mlir::Value result; +QualType lhsTy = e->getLHS()->getType(); +QualType rhsTy = e->getRH

[clang] [CIR] Upstream CmpOp (PR #133159)

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

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

2025-03-26 Thread Reid Kleckner 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] [llvm] [llvm][clang] Allocate a new stack instead of spawning a new thread to get more stack space (PR #133173)

2025-03-26 Thread Reid Kleckner 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] [flang] [flang] Expose -m32 and -m64 options (PR #132409)

2025-03-26 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu approved this pull request. https://github.com/llvm/llvm-project/pull/132409 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Expose -m32 and -m64 options (PR #132409)

2025-03-26 Thread Tarun Prabhu via cfe-commits
@@ -0,0 +1,4 @@ +! Check support of -m64. +! RUN: %flang -target i386-pc-win32 -m64 -### - %s 2>&1 | FileCheck -check-prefix=M64 %s + +! M64: "-triple" "{{[^-]+}}64-{{.*}}" tarunprabhu wrote: If the `-target` is given as `i386-*`, this should always return `x86_

[clang] [CIR] Add BinOpOverflowOp and basic pointer arithmetic support (PR #133118)

2025-03-26 Thread Bruno Cardoso Lopes via cfe-commits
@@ -1117,6 +1118,122 @@ mlir::LogicalResult CIRToLLVMBinOpLowering::matchAndRewrite( return mlir::LogicalResult::success(); } +mlir::LogicalResult CIRToLLVMBinOpOverflowOpLowering::matchAndRewrite( +cir::BinOpOverflowOp op, OpAdaptor adaptor, +mlir::ConversionPatter

[clang] [llvm] [HLSL] Implement the `smoothstep` intrinsic (PR #132288)

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

[clang] [CIR] Upstream support for while and do..while loops (PR #133157)

2025-03-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Andy Kaylor (andykaylor) Changes This adds basic support for while and do..while loops. Support for break and continue are left for a subsequent patch. --- Full diff: https://github.com/llvm/llvm-project/pull/133157.diff 7 Files Affec

[clang] [CIR] Upstream zero init for global variables (PR #133100)

2025-03-26 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes commented: Overall looks fine! https://github.com/llvm/llvm-project/pull/133100 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream support for while and do..while loops (PR #133157)

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

[clang-tools-extra] [llvm] Clang doc mustache rebase (PR #133161)

2025-03-26 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 2d1517d257fcbd0c9bce14badc7646e94d81ea2b 9dbd1b84d501db2619b716a029e612bca60eef5f --e

[clang] [llvm] [HLSL] Implement the `smoothstep` intrinsic (PR #132288)

2025-03-26 Thread Kaitlin Peng via cfe-commits
@@ -0,0 +1,60 @@ +; 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 %} kmpeng wrote: Seems like this change produces thi

[clang] [CIR][NFC] Fix warnings in ClangIR code (PR #133134)

2025-03-26 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. https://github.com/llvm/llvm-project/pull/133134 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream support for while and do..while loops (PR #133157)

2025-03-26 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. Looks straight-forward to me, one minor nit! https://github.com/llvm/llvm-project/pull/133157 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang] [CIR] Upstream support for while and do..while loops (PR #133157)

2025-03-26 Thread Bruno Cardoso Lopes via cfe-commits
@@ -759,6 +761,84 @@ def BrCondOp : CIR_Op<"brcond", }]; } +//===--===// +// While & DoWhileOp +//===--===// + +class WhileOpBase : CIR_Op

[clang] [llvm] [HLSL] Implement the `smoothstep` intrinsic (PR #132288)

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

[clang] [clang] Update Mach-O ptrauth driver defaults (PR #132834)

2025-03-26 Thread Jon Roelofs via cfe-commits
jroelofs wrote: Looks mechanically okay, but I need to defer to Ahmed on whether you're missing other bits that go along with this. He's around, just need to be patient ;) https://github.com/llvm/llvm-project/pull/132834 ___ cfe-commits mailing list c

[clang] [alpha.webkit.RawPtrRefMemberChecker] The checker doesn't warn Objective-C types in ivars. (PR #132833)

2025-03-26 Thread Rashmi Mudduluru via cfe-commits
@@ -58,3 +59,11 @@ void forceTmplToInstantiate(FooTmpl) {} void forceTmplToInstantiate(RefPtr) {} } + +@interface AnotherObject : NSObject { + NSString *ns_string; + // expected-warning@-1{{Instance variable 'ns_string' in 'AnotherObject' is a raw pointer to retainable ty

[clang] [llvm] [HLSL] Implement the `smoothstep` intrinsic (PR #132288)

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

[clang] [MS][clang] Add support for vector deleting destructors (PR #126240)

2025-03-26 Thread Reid Kleckner via cfe-commits
rnk wrote: I'll try to take a look at this when I get a chance, but that looks like it's not happening today. I read the comments a bit and found some codesearch links worth sharing for reference. Here's the original UnicodeString array new operation: https://source.chromium.org/chromium/chrom

[clang] [Serialization] Fix lazy template loading (PR #133057)

2025-03-26 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > While I may not able to look into them in detail recently, it may be > > helpful to split this into seperate patches to review and to land. > > I initially considered this, but @vgvassilev said in [root-project/root#17722 > (comment)](https://github.com/root-project/root/

[clang] [Serialization] Fix lazy template loading (PR #133057)

2025-03-26 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > Complete only needed partial specializations: It is unclear (to me) why this > needs to be done "for safety", but this change significantly improves the > effectiveness of lazy loading. This comes from the logic: if we have a partial template specialization `A` and we need

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

2025-03-26 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] [clang][CodeComplete] Use HeuristicResolver in getAsRecordDecl() (PR #130473)

2025-03-26 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 converted_to_draft https://github.com/llvm/llvm-project/pull/130473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix various bugs in alias CTAD transform (PR #132061)

2025-03-26 Thread Matheus Izvekov via cfe-commits
@@ -1650,6 +1665,23 @@ namespace { return inherited::TransformTemplateArgument(Input, Output, Uneval); } +std::optional ComputeSizeOfPackExprWithoutSubstitution( +ArrayRef PackArgs) { + // Don't do this when rewriting template parameters for CTAD: +

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

2025-03-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Michael Spencer (Bigcheese) Changes Clang spawns a new thread to avoid running out of stack space. This can make debugging and performance analysis more difficult as how the threads are connected is difficult to recover. This patch intro

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

2025-03-26 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese created https://github.com/llvm/llvm-project/pull/133173 Clang spawns a new thread to avoid running out of stack space. This can make debugging and performance analysis more difficult as how the threads are connected is difficult to recover. This patch introduces

[clang] [libc] [Clang] Make `--lto-partitions` only default for HIP (PR #133164)

2025-03-26 Thread Shilei Tian via cfe-commits
@@ -21,7 +21,7 @@ // RUN: %clang -### --target=amdgcn-amd-amdhsa -mcpu=gfx90a:xnack+:sramecc- -nogpulib \ // RUN: -L. -flto -fconvergent-functions %s 2>&1 | FileCheck -check-prefix=LTO %s // LTO: clang{{.*}} "-flto=full"{{.*}}"-fconvergent-functions" -// LTO: ld.lld{{.*}}"

[clang] [llvm] [HLSL] Implement the `smoothstep` intrinsic (PR #132288)

2025-03-26 Thread Kaitlin Peng via cfe-commits
https://github.com/kmpeng updated https://github.com/llvm/llvm-project/pull/132288 >From 1d28510653b39fcabe45ad37197674bdd0217add Mon Sep 17 00:00:00 2001 From: kmpeng Date: Tue, 18 Mar 2025 13:25:10 -0700 Subject: [PATCH 01/10] create int_spv_smoothstep intrinsic, create smoothstep lowering &

[clang] [CIR] Add BinOpOverflowOp and basic pointer arithmetic support (PR #133118)

2025-03-26 Thread Andy Kaylor via cfe-commits
@@ -1402,3 +1501,23 @@ mlir::Value CIRGenFunction::emitScalarPrePostIncDec(const UnaryOperator *e, return ScalarExprEmitter(*this, builder) .emitScalarPrePostIncDec(e, lv, isInc, isPre); } + +mlir::Value CIRGenFunction::emitCheckedInBoundsGEP( +mlir::Type elemTy, m

[clang] [llvm] [HLSL] Implement the `smoothstep` intrinsic (PR #132288)

2025-03-26 Thread Kaitlin Peng via cfe-commits
@@ -0,0 +1,60 @@ +; 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 %} kmpeng wrote: Code updated with `--target-env vul

[clang] [libc] [Clang] Make `--lto-partitions` only default for HIP (PR #133164)

2025-03-26 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. https://github.com/llvm/llvm-project/pull/133164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RFC][clang] Handle friend function that was a definition but became only a declaration during AST deserialization (PR #132214)

2025-03-26 Thread via cfe-commits
@@ -2572,7 +2572,7 @@ Decl *TemplateDeclInstantiator::VisitFunctionDecl( // Friend function defined withing class template may stop being function // definition during AST merges from different modules, in this case decl // with function body should be used for instantiat

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

2025-03-26 Thread Andy Kaylor via cfe-commits
@@ -658,6 +742,27 @@ mlir::LogicalResult CIRToLLVMConstantOpLowering::matchAndRewrite( } assert(!cir::MissingFeatures::opGlobalViewAttr()); attr = op.getValue(); + } else if (const auto arrTy = mlir::dyn_cast(op.getType())) { +const auto constArr = mlir::dyn_c

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

2025-03-26 Thread Andy Kaylor via cfe-commits
@@ -620,6 +682,28 @@ mlir::LogicalResult CIRToLLVMStoreOpLowering::matchAndRewrite( return mlir::LogicalResult::success(); } +/// Switches on the type of attribute and calls the appropriate conversion. +mlir::Value lowerCirAttrAsValue(mlir::Operation *parentOp,

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

2025-03-26 Thread Andy Kaylor via cfe-commits
@@ -658,6 +742,27 @@ mlir::LogicalResult CIRToLLVMConstantOpLowering::matchAndRewrite( } assert(!cir::MissingFeatures::opGlobalViewAttr()); attr = op.getValue(); + } else if (const auto arrTy = mlir::dyn_cast(op.getType())) { +const auto constArr = mlir::dyn_c

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

2025-03-26 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,150 @@ +//- LoweringHelpers.cpp - Lowering helper functions ---===// +// +// 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-tools-extra] [clang] Concepts: support pack expansions for type constraints (PR #132626)

2025-03-26 Thread via cfe-commits
@@ -70,7 +70,14 @@ struct alignas(ConstraintAlignment) AtomicConstraint { // We do not actually substitute the parameter mappings into the // constraint expressions, therefore the constraint expressions are // the originals, and comparing them will suffice. -if

[clang] [llvm] [HLSL] Implement the `smoothstep` intrinsic (PR #132288)

2025-03-26 Thread Kaitlin Peng via cfe-commits
@@ -101,6 +101,52 @@ bool SemaSPIRV::CheckSPIRVBuiltinFunctionCall(unsigned BuiltinID, TheCall->setType(RetTy); break; } + case SPIRV::BI__builtin_spirv_smoothstep: { +if (SemaRef.checkArgCount(TheCall, 3)) + return true; + +// check if the all argument

[clang] [llvm] [IRBuilder] Add new overload for CreateIntrinsic (PR #131942)

2025-03-26 Thread Rahul Joshi via cfe-commits
jurahul wrote: @nikic any concerns? I'll merge in a couple of days https://github.com/llvm/llvm-project/pull/131942 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][CodeGen] Generate follow-up metadata for loops in correct format (PR #131985)

2025-03-26 Thread Michael Kruse via cfe-commits
@@ -227,36 +226,26 @@ void for_test_scalable_1(int *List, int Length) { // CHECK: ![[LOOP_5]] = distinct !{![[LOOP_5]], ![[UNROLL_DISABLE:.*]], ![[DISTRIBUTE_DISABLE:.*]], ![[WIDTH_1:.*]]} // CHECK: ![[WIDTH_1]] = !{!"llvm.loop.vectorize.width", i32 1} -// CHECK: ![[LOOP_6]]

[clang] [clang] fix deduction of member pointers with dependent named classes (PR #133113)

2025-03-26 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/133113 >From d1831e84e62f5a100de193619cbfdf9a1d403674 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Wed, 26 Mar 2025 12:26:40 -0300 Subject: [PATCH 1/2] [clang] fix deduction of member pointers with dependent

[clang] [clang-tools-extra] [lldb] Revert "Reland: [clang] preserve class type sugar when taking pointer to member" (PR #132280)

2025-03-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Matheus Izvekov (mizvekov) Changes Reverts llvm/llvm-project#132234 Needs to be reverted due to dependency. This blocks reverting another PR, see here: https://github.com/llvm/llvm-project/pull/131965#issuecomment-2741619498

[clang] a942d7f - [clang] fix deduction of member pointers with dependent named classes (#133113)

2025-03-26 Thread via cfe-commits
Author: Matheus Izvekov Date: 2025-03-26T15:51:41-03:00 New Revision: a942d7f8106226ba79185e60873c0e0e654f1e68 URL: https://github.com/llvm/llvm-project/commit/a942d7f8106226ba79185e60873c0e0e654f1e68 DIFF: https://github.com/llvm/llvm-project/commit/a942d7f8106226ba79185e60873c0e0e654f1e68.dif

[clang] [C2y] Implement WG14 N3369 and N3469 (_Countof) (PR #133125)

2025-03-26 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,92 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// RUN: %clang_cc1 -std=c2y -emit-llvm -o - %s | FileCheck %s + +// This tests the codegen behavior for _Countof. +// CHECK-LABEL: define dso_local i32 @test1( +

[clang] [llvm] [VectorCombine] Shrink loads used in shufflevector rebroadcasts (PR #128938)

2025-03-26 Thread Simon Pilgrim via cfe-commits
@@ -47,21 +47,12 @@ define <8 x i32> @concat_extract_subvectors_poison(<8 x i32> %x) { ; broadcast loads are free on AVX (and blends are much cheap than general 2-operand shuffles) define <4 x double> @blend_broadcasts_v4f64(ptr %p0, ptr %p1) { -; SSE-LABEL: define <4 x do

[clang] [clang] fix constexpr-unknown handling of self-references. (PR #132990)

2025-03-26 Thread via cfe-commits
@@ -177,3 +177,50 @@ namespace extern_reference_used_as_unknown { int y; constinit int& g = (x,y); // expected-warning {{left operand of comma operator has no effect}} } + +namespace uninit_reference_used { + int y; + constexpr int &r = r; // expected-error {{must be ini

[clang-tools-extra] [clang-doc] Allow setting a base directory for hosted pages (PR #132482)

2025-03-26 Thread Daniel Thornburgh via cfe-commits
https://github.com/mysterymath approved this pull request. LGTM for JS-isms https://github.com/llvm/llvm-project/pull/132482 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream support for while and do..while loops (PR #133157)

2025-03-26 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/133157 This adds basic support for while and do..while loops. Support for break and continue are left for a subsequent patch. >From ecaf51cd128e9045b9926ecafc918ec3e35a9908 Mon Sep 17 00:00:00 2001 From: Andy Kaylo

[clang] [CIR][NFC] Organize emit functions in CIRGenFunction.h (PR #133017)

2025-03-26 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-aarch64-quick` running on `linaro-clang-aarch64-quick` while building `clang` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/65/builds/14464 Here is the relevant pie

[clang] [Clang] Do not create dependent CallExpr having UnresolvedLookupExpr inside non-dependent context (PR #124609)

2025-03-26 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: I have a few concerns w/ this PR. Number one we do not cover the original test case which crashes, as far as I can tell none of the tests crash before this fix. This is large oversight. It looks like currently gcc is the only one that rejects this code as w

[clang] [llvm] [IRBuilder] Add new overload for CreateIntrinsic (PR #131942)

2025-03-26 Thread Jay Foad via cfe-commits
https://github.com/jayfoad approved this pull request. LGTM, seems like a nice (minor) cleanup. https://github.com/llvm/llvm-project/pull/131942 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[clang] [clang][ExtractAPI] fix a couple crashes when used via libclang (PR #132297)

2025-03-26 Thread via cfe-commits
@@ -0,0 +1,41 @@ +// Test is line- and column-sensitive. Run lines are below + +template +class basic_vector { +public: +T x; +T y; +}; + +using my_vec = basic_vector; + +class MyClass { +my_vec myVec; +}; + +struct OuterStruct { +struct InnerStruct; +int oute

[clang] [WIP][Clang] Allow floating point fixed vectors with atomic builtins (PR #129495)

2025-03-26 Thread Vikram Hegde via cfe-commits
@@ -531,6 +531,12 @@ static void EmitAtomicOp(CodeGenFunction &CGF, AtomicExpr *E, Address Dest, bool PostOpMinMax = false; unsigned PostOp = 0; + auto IsFloat = E->getValueType()->isVectorType() + ? E->getValueType() + ->cas

[clang] [llvm] [HLSL] Implement the `smoothstep` intrinsic (PR #132288)

2025-03-26 Thread Kaitlin Peng via cfe-commits
@@ -0,0 +1,60 @@ +; 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 %} kmpeng wrote: Would you also like this added to t

[clang] [PATCH] [clang][frontend] Fix AllocKind retrieving for `CXXConstructorDecl` refs #132794 (PR #133077)

2025-03-26 Thread via cfe-commits
cor3ntin wrote: Thanks for working on this This change needs a release note. Please add an entry to `clang/docs/ReleaseNotes.rst` in the section the most adapted to the change, and referencing any Github issue this change fixes. Thanks! https://github.com/llvm/llvm-project/pull/133077 __

[clang] [PATCH] [clang][frontend] Fix AllocKind retrieving for `CXXConstructorDecl` refs #132794 (PR #133077)

2025-03-26 Thread via cfe-commits
@@ -2601,10 +2601,11 @@ class CXXConstructorDecl final void anchor() override; size_t numTrailingObjects(OverloadToken) const { -return CXXConstructorDeclBits.IsInheritingConstructor; +return getCanonicalDecl()->CXXConstructorDeclBits.IsInheritingConstructor; }

[clang] [llvm] [HLSL] Implement the `smoothstep` intrinsic (PR #132288)

2025-03-26 Thread Kaitlin Peng via cfe-commits
https://github.com/kmpeng updated https://github.com/llvm/llvm-project/pull/132288 >From 7853b27b8fffa6d2c0393a4004abaac9a7954608 Mon Sep 17 00:00:00 2001 From: kmpeng Date: Tue, 18 Mar 2025 13:25:10 -0700 Subject: [PATCH 01/10] create int_spv_smoothstep intrinsic, create smoothstep lowering &

[clang] [libc] [Clang] Make `--lto-partitions` only default for HIP (PR #133164)

2025-03-26 Thread Joseph Huber via cfe-commits
@@ -33,14 +33,8 @@ function(add_startup_object name) set_target_properties(${fq_target_name}.exe PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${LIBC_LIBRARY_DIR} RUNTIME_OUTPUT_NAME ${name}.o) -# FIXME: A bug in the AMDGPU LTO pass is incorrectly removing the kernels

[clang] [libc] [Clang] Make `--lto-partitions` only default for HIP (PR #133164)

2025-03-26 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/133164 >From 8c8885d486ac72145d7fd7ba003db7ea9ab17a1f Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Wed, 26 Mar 2025 16:03:20 -0500 Subject: [PATCH 1/2] [Clang] Make `--lto-partitions` only default for HIP Summary

[clang] [llvm] [HLSL] Implement the `smoothstep` intrinsic (PR #132288)

2025-03-26 Thread Kaitlin Peng via cfe-commits
@@ -101,6 +101,52 @@ bool SemaSPIRV::CheckSPIRVBuiltinFunctionCall(unsigned BuiltinID, TheCall->setType(RetTy); break; } + case SPIRV::BI__builtin_spirv_smoothstep: { +if (SemaRef.checkArgCount(TheCall, 3)) + return true; + +// check if the all argument

[clang] [llvm] [HLSL] Implement the `smoothstep` intrinsic (PR #132288)

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

[clang] [llvm] [AArch64] Add FEAT_FPAC to Neoverse V2 (PR #133054)

2025-03-26 Thread Ricardo Jesus via cfe-commits
https://github.com/rj-jesus edited https://github.com/llvm/llvm-project/pull/133054 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] link_bc target should depends on target builtins.link.clc-arch_suffix (PR #132338)

2025-03-26 Thread Wenju He via cfe-commits
https://github.com/wenju-he updated https://github.com/llvm/llvm-project/pull/132338 >From 6ce54aa767f8cdff2f938cdce8656e495a1346f0 Mon Sep 17 00:00:00 2001 From: Wenju He Date: Thu, 20 Mar 2025 22:01:55 -0700 Subject: [PATCH 1/3] [libclc] link_bc target should depends on target builtins.link.

[clang] 2b43ecd - [webkit.RefCntblBaseVirtualDtor] Add support for NoVirtualDestructorBase. (#132497)

2025-03-26 Thread via cfe-commits
Author: Ryosuke Niwa Date: 2025-03-26T16:57:49-07:00 New Revision: 2b43ecd27b9651ac2bfb1328ad14b43a0f47a385 URL: https://github.com/llvm/llvm-project/commit/2b43ecd27b9651ac2bfb1328ad14b43a0f47a385 DIFF: https://github.com/llvm/llvm-project/commit/2b43ecd27b9651ac2bfb1328ad14b43a0f47a385.diff

[clang] [llvm] [HLSL] Implement the `smoothstep` intrinsic (PR #132288)

2025-03-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-ir Author: Kaitlin Peng (kmpeng) Changes Closes #99156. Tasks completed: - Implement `smoothstep` using HLSL source in `hlsl_intrinsics.h` - Implement the `smoothstep` SPIR-V target built-in in `clang/include/clang/Basic/BuiltinsSPIRV.td` - Add s

[clang] [clang]: fix overload resolution in case of bind rvalue ref to const lvalue ref (PR #133035)

2025-03-26 Thread Nhat Nguyen via cfe-commits
https://github.com/changkhothuychung edited https://github.com/llvm/llvm-project/pull/133035 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][clang] Split clang/lib/CodeGen/CGBuiltin.cpp into target-specific files (PR #132252)

2025-03-26 Thread Farzon Lotfi via cfe-commits
farzonl wrote: In the future It would have been good to get feedback from the HLSL team before moving `EmitHLSLBuiltinExpr` to `clang/lib/CodeGen/TargetBuiltins/AMDGPU.cpp`. HLSL is a language and does not fall into the TargetBuiltin categorization. It supports all gpus. https://github.com/ll

[clang] [CIR][NFC] Fix warnings in ClangIR code (PR #133134)

2025-03-26 Thread Andy Kaylor via cfe-commits
@@ -170,7 +170,7 @@ mlir::Value CIRGenFunction::evaluateExprAsBool(const Expr *e) { SourceLocation loc = e->getExprLoc(); assert(!cir::MissingFeatures::pgoUse()); - if (const MemberPointerType *MPT = e->getType()->getAs()) { + if (e->getType()->getAs()) { -

[clang] [CIR][NFC] Fix warnings in ClangIR code (PR #133134)

2025-03-26 Thread Andy Kaylor via cfe-commits
@@ -1251,13 +1236,12 @@ void ConvertCIRToLLVMPass::runOnOperation() { patterns.add(converter, patterns.getContext(), dl); patterns.add(converter, patterns.getContext(), dl); patterns.add(converter, patterns.getContext(), dl); - patterns.add(converter, patterns.getContex

[clang] [clang][AMDGPU] Enable module splitting by default (PR #128509)

2025-03-26 Thread Joseph Huber via cfe-commits
jhuber6 wrote: This seems to have broken LTO linking / introduced some non-determinism. I noticed that the LLVM libc `crt1.o` file was missing a lot of definitions for some reason and traces it back to this. Here's the IR that comes out of `clang` https://godbolt.org/z/4fz35PaPb. If we take t

[clang] [C2y] Implement WG14 N3369 and N3469 (_Countof) (PR #133125)

2025-03-26 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/133125 >From 75ef42d644da9136fb07014ade18b6be137426a1 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Wed, 26 Mar 2025 12:54:29 -0400 Subject: [PATCH 1/4] [C2y] Implement WG14 N3369 and N3469 (_Countof) C2y ad

[clang] [CIR] Upstream CmpOp (PR #133159)

2025-03-26 Thread Morris Hafner via cfe-commits
https://github.com/mmha created https://github.com/llvm/llvm-project/pull/133159 This patch adds support for comparison operators with ClangIR, both integral and floating point. >From 6db5880fa7cdf6363d7e0025f811f42ec273df52 Mon Sep 17 00:00:00 2001 From: Morris Hafner Date: Wed, 26 Mar 2025 2

[clang] [llvm] cuda clang: Fix argument order for __reduce_max_sync (PR #132881)

2025-03-26 Thread Artem Belevich via cfe-commits
Artem-B wrote: > > @AustinSchuh would you like me to merge the change for you, once the checks > > are done? > > That would be wonderful. I don't know how to merge it (happy to learn, but I > suspect I won't do it more than a couple of times) https://llvm.org/docs/DeveloperPolicy.html#obtaini

[clang] [CIR] Upstream CmpOp (PR #133159)

2025-03-26 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 25f4f0a56de741a8120cfeab297211e9505ec1d7 6db5880fa7cdf6363d7e0025f811f42ec273df52 --e

[clang] [llvm] cuda clang: Fix argument order for __reduce_max_sync (PR #132881)

2025-03-26 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B closed https://github.com/llvm/llvm-project/pull/132881 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 2d1517d - cuda clang: Fix argument order for __reduce_max_sync (#132881)

2025-03-26 Thread via cfe-commits
Author: Austin Schuh Date: 2025-03-26T13:54:58-07:00 New Revision: 2d1517d257fcbd0c9bce14badc7646e94d81ea2b URL: https://github.com/llvm/llvm-project/commit/2d1517d257fcbd0c9bce14badc7646e94d81ea2b DIFF: https://github.com/llvm/llvm-project/commit/2d1517d257fcbd0c9bce14badc7646e94d81ea2b.diff

[clang] [llvm] cuda clang: Fix argument order for __reduce_max_sync (PR #132881)

2025-03-26 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] [CIR] Upstream CmpOp (PR #133159)

2025-03-26 Thread Morris Hafner via cfe-commits
https://github.com/mmha updated https://github.com/llvm/llvm-project/pull/133159 >From 6db5880fa7cdf6363d7e0025f811f42ec273df52 Mon Sep 17 00:00:00 2001 From: Morris Hafner Date: Wed, 26 Mar 2025 20:50:57 + Subject: [PATCH 1/2] [CIR] Upstream CmpOp This patch adds support for comparison ope

[clang] [HLSL] Add new int overloads for math builtins (PR #133162)

2025-03-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 @llvm/pr-subscribers-clang Author: Sarah Spall (spall) Changes Add int overloads which cast the various ints to a float and call the float builtin. These overloads are conditional on hlsl version 202x or earlier. Add tests and puts tests in

[clang] [libc] [Clang] Make `--lto-partitions` only default for HIP (PR #133164)

2025-03-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Joseph Huber (jhuber6) Changes Summary: The default behavior for LTO on other targets does not specify the number of LTO partitions. Recent changes made this default to 8 on AMDGPU which had some issues with the `libc` project. The o

[clang] [libc] [Clang] Make `--lto-partitions` only default for HIP (PR #133164)

2025-03-26 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/133164 Summary: The default behavior for LTO on other targets does not specify the number of LTO partitions. Recent changes made this default to 8 on AMDGPU which had some issues with the `libc` project. The option to d

[clang] [webkit.RefCntblBaseVirtualDtor] Add support for NoVirtualDestructorBase. (PR #132497)

2025-03-26 Thread Ryosuke Niwa via cfe-commits
rniwa wrote: Thank you for the review! https://github.com/llvm/llvm-project/pull/132497 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   5   6   >