[clang] [Sema] Suggest missing format attributes (PR #166738)

2025-12-01 Thread Vladimir Vuksanovic via cfe-commits
vvuksanovic wrote: Okay then, thank you for the review and the help. If nobody else has any comments, can you or someone else merge the PR? I don't have commit access. https://github.com/llvm/llvm-project/pull/166738 ___ cfe-commits mailing list cfe-

[clang] [llvm] [PowerPC][AIX] Specify correct ABI alignment for double (PR #144673)

2025-12-01 Thread Nikita Popov via cfe-commits
@@ -96,16 +96,16 @@ define double @double_va_arg(double %a, ...) local_unnamed_addr { ; CHECK-LABEL: double_va_arg: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT:addi 3, 1, 56 -; CHECK-NEXT:std 4, 56(1) -; CHECK-NEXT:std 3, -8(1) +; CHECK-NEXT:lfd 0, 56(1) ---

[clang] [llvm] [PowerPC][AIX] Specify correct ABI alignment for double (PR #144673)

2025-12-01 Thread Nikita Popov via cfe-commits
@@ -29,8 +29,8 @@ %struct.anon = type <{ i32, double }> @astruct = global [1 x %struct.anon] [%struct.anon <{ i32 1, double 7.00e+00 }>], align 1 -%struct.anon2 = type { double, i32 } -@bstruct = global [1 x %struct.anon2] [%struct.anon2 { double 7.00e+00 , i32 1}],

[clang] [llvm] [PowerPC][AIX] Specify correct ABI alignment for double (PR #144673)

2025-12-01 Thread Nikita Popov via cfe-commits
https://github.com/nikic updated https://github.com/llvm/llvm-project/pull/144673 >From 631400307994caa04e6fa781cb1a1ee431b7b271 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 11 Jun 2025 11:17:53 +0200 Subject: [PATCH 1/2] [PowerPC][AIX] Specify correct ABI alignment for double Add `f

[clang] [OpenCL][NVPTX] Don't set calling convention for OpenCL kernel (PR #170170)

2025-12-01 Thread Aniket Lal via cfe-commits
@@ -277,7 +277,9 @@ void NVPTXTargetCodeGenInfo::setTargetAttributes( } } // Attach kernel metadata directly if compiling for NVPTX. - if (FD->hasAttr()) + // NOTE: Don't set kernel calling convention for handled OpenCL kernel, + // otherwise the stub version of kern

[clang] [CLANG] Fixes the issue with using bool in builtin_bswapg (PR #169285)

2025-12-01 Thread Ebin Jose via cfe-commits
https://github.com/ebinjose02 updated https://github.com/llvm/llvm-project/pull/169285 >From 4baf6aac54499c5fdbeab33a4dc956487b4b5c02 Mon Sep 17 00:00:00 2001 From: ebinjose02 Date: Mon, 24 Nov 2025 07:02:26 + Subject: [PATCH 1/2] Fixes #168690 Prevents assertion in CGBuiltin for i1 - retu

[clang] [CLANG] Fixes the issue with using bool in builtin_bswapg (PR #169285)

2025-12-01 Thread Ebin Jose via cfe-commits
@@ -0,0 +1,8 @@ +// RUN: %clang_cc1 -triple x86_64 -O0 -emit-llvm -o - %s | FileCheck %s +#include +bool test_bswapg(bool c) { + return __builtin_bswapg(c); ebinjose02 wrote: There is a testfile that check __builtin_bswapg along with other builtins (test/codeg

[clang] [llvm] Clang: Add nsz to llvm.minnum and llvm.maxnum emitted from fmin and fmax (PR #113133)

2025-12-01 Thread Matt Arsenault via cfe-commits
arsenm wrote: > #168838 > > OK, now we decides to define `llvm.minnum` and `llvm.maxnum` as same as libm. > So we don't need it now. Let's close it. No, this should still be done https://github.com/llvm/llvm-project/pull/113133 ___ cfe-commits mail

[clang] [llvm] Clang: Add nsz to llvm.minnum and llvm.maxnum emitted from fmin and fmax (PR #113133)

2025-12-01 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm reopened https://github.com/llvm/llvm-project/pull/113133 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR][X86] Add support for kunpck builtins (PR #168757)

2025-12-01 Thread Ahmed Nour via cfe-commits
ahmednoursphinx wrote: > Looks good to me. Do you need assistance committing this? Yes, please. I’d appreciate your help committing this https://github.com/llvm/llvm-project/pull/168757 ___ cfe-commits mailing list [email protected] https://l

[clang] [CIR][X86] Add support for kunpck builtins (PR #168757)

2025-12-01 Thread Ahmed Nour via cfe-commits
https://github.com/ahmednoursphinx updated https://github.com/llvm/llvm-project/pull/168757 >From 2f02de39803ff7ebde3e52ac60dabbb3d062515c Mon Sep 17 00:00:00 2001 From: ahmed Date: Wed, 19 Nov 2025 12:46:29 +0200 Subject: [PATCH 01/24] feat: Add support for kunpack builtins --- clang/lib/CIR

[clang] [CIR][X86] Add support for kunpck builtins (PR #168757)

2025-12-01 Thread Ahmed Nour via cfe-commits
https://github.com/ahmednoursphinx updated https://github.com/llvm/llvm-project/pull/168757 >From 2f02de39803ff7ebde3e52ac60dabbb3d062515c Mon Sep 17 00:00:00 2001 From: ahmed Date: Wed, 19 Nov 2025 12:46:29 +0200 Subject: [PATCH 01/23] feat: Add support for kunpack builtins --- clang/lib/CIR

[clang] [llvm] [clang][NVPTX] Add support for mixed-precision FP arithmetic (PR #168359)

2025-12-01 Thread Srinivasa Ravi via cfe-commits
https://github.com/Wolfram70 edited https://github.com/llvm/llvm-project/pull/168359 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement -fstrict-bool (PR #160790)

2025-12-01 Thread via cfe-commits
=?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier Message-ID: In-Reply-To: @@ -0,0 +1,22 @@ +// RUN: %clang -### %s 2>&1 | FileCheck %s --check-prefix=CHECK-NONE +// RUN: %clang -### -fstrict-bool %s 2>&1 | FileCheck %s --check-prefix=CHECK-S

[clang] [Clang] Reuse the function getOptimizationLevel in tools::addLTOOptions. (PR #169762)

2025-12-01 Thread Jim Lin via cfe-commits
@@ -916,6 +922,12 @@ void applyOverrideOptions(SmallVectorImpl &Args, raw_ostream *OS = nullptr); } // end namespace driver + +unsigned getOptimizationLevel(const llvm::opt::ArgList &Args, InputKind IK, + DiagnosticsEngin

[clang] [Clang] Reuse the function getOptimizationLevel in tools::addLTOOptions. (PR #169762)

2025-12-01 Thread Jim Lin via cfe-commits
https://github.com/tclin914 updated https://github.com/llvm/llvm-project/pull/169762 >From 7d0cfecfd087826dcecbd35e81a0714a9441797e Mon Sep 17 00:00:00 2001 From: Jim Lin Date: Fri, 21 Nov 2025 15:35:24 +0800 Subject: [PATCH 1/2] [Clang] Reuse the function getOptimizationLevel in tools::addLTO

[clang] Replace interp__builtin_blend with interp__builtin_ia32_shuffle_gener… (PR #170217)

2025-12-01 Thread Timm Baeder via cfe-commits
@@ -4624,7 +4624,15 @@ bool InterpretBuiltin(InterpState &S, CodePtr OpPC, const CallExpr *Call, case clang::X86::BI__builtin_ia32_pblendw256: case clang::X86::BI__builtin_ia32_pblendd128: case clang::X86::BI__builtin_ia32_pblendd256: -return interp__builtin_blend(S,

[clang] [X86][Clang] Support constexpr evaluation of cvtpd2ps intrinsics (PR #169980)

2025-12-01 Thread Timm Baeder via cfe-commits
@@ -3359,6 +3391,143 @@ static bool interp__builtin_ia32_cvt_vec2mask(InterpState &S, CodePtr OpPC, pushInteger(S, RetMask, Call->getType()); return true; } +static bool interp__builtin_ia32_cvtsd2ss(InterpState &S, CodePtr OpPC, +

[clang] [Clang] Make __builtin_assume_dereferenceable constexpr (PR #169869)

2025-12-01 Thread Timm Baeder via cfe-commits
@@ -0,0 +1,50 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -std=c++14 -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -std=c++14 -emit-llvm -o - %s -fexperimental-new-constant-interpreter | FileCheck %s + +int b = 10; +const int f =

[clang] [clang] Handle null dtor decl during consumed analysis (PR #170180)

2025-12-01 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 approved this pull request. https://github.com/llvm/llvm-project/pull/170180 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode][NFC] Add popToUInt64() to builtin evaluation (PR #170164)

2025-12-01 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/170164 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] ff3d550 - [clang][bytecode][NFC] Add popToUInt64() to builtin evaluation (#170164)

2025-12-01 Thread via cfe-commits
Author: Timm Baeder Date: 2025-12-02T05:40:15+01:00 New Revision: ff3d550d7ec4ec36750b730afb993cdf061b01f7 URL: https://github.com/llvm/llvm-project/commit/ff3d550d7ec4ec36750b730afb993cdf061b01f7 DIFF: https://github.com/llvm/llvm-project/commit/ff3d550d7ec4ec36750b730afb993cdf061b01f7.diff L

[clang] [llvm] [clang/LLVM] Add function level flatten_depth attribute for depth-limited inlining (PR #165777)

2025-12-01 Thread Andrew Pinski via cfe-commits
pinskia wrote: > Thank you for your feedback and for raising these concerns. To clarify, our > primary use case at Meta is to completely flatten functions by inlining the > entire call tree. The max depth parameter is not intended as a core part of > the user workflow, but rather as a safeguar

[clang] [clang] Propagate definition data to all redecls (PR #170090)

2025-12-01 Thread Alexander Kornienko via cfe-commits
alexfh wrote: Thank you for the fix! I'll test this internally and will come back with the results. https://github.com/llvm/llvm-project/pull/170090 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinf

[clang] [clang] Implement -fstrict-bool (PR #160790)

2025-12-01 Thread via cfe-commits
=?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier Message-ID: In-Reply-To: @@ -0,0 +1,22 @@ +// RUN: %clang -### %s 2>&1 | FileCheck %s --check-prefix=CHECK-NONE +// RUN: %clang -### -fstrict-bool %s 2>&1 | FileCheck %s --check-prefix=CHECK-S

[clang] [OpenCL][NVPTX] Don't set calling convention for OpenCL kernel (PR #170170)

2025-12-01 Thread Hongyu Chen via cfe-commits
https://github.com/XChy updated https://github.com/llvm/llvm-project/pull/170170 >From def58994c7e783e50260be3eba888f100956797d Mon Sep 17 00:00:00 2001 From: XChy Date: Tue, 2 Dec 2025 00:42:10 +0800 Subject: [PATCH 1/5] precommit tests --- clang/test/CodeGenOpenCL/ptx-calls.cl | 19 +

[clang] [StatusOr] [10/N] Add support for absl CHECK macros (PR #169749)

2025-12-01 Thread Jan Voung via cfe-commits
@@ -602,6 +627,67 @@ static void transferStatusConstructor(const CXXConstructExpr *Expr, if (State.Env.getValue(locForOk(StatusLoc)) == nullptr) initializeStatus(StatusLoc, State.Env); } +static void +transferLoggingGetReferenceableValueCall(const CallExpr *Expr, +

[clang] [StatusOr] [10/N] Add support for absl CHECK macros (PR #169749)

2025-12-01 Thread Jan Voung via cfe-commits
https://github.com/jvoung approved this pull request. https://github.com/llvm/llvm-project/pull/169749 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenCL][NVPTX] Don't set calling convention for OpenCL kernel (PR #170170)

2025-12-01 Thread Hongyu Chen via cfe-commits
@@ -277,7 +277,9 @@ void NVPTXTargetCodeGenInfo::setTargetAttributes( } } // Attach kernel metadata directly if compiling for NVPTX. - if (FD->hasAttr()) + // NOTE: Don't set kernel calling convention for handled OpenCL kernel, + // otherwise the stub version of kern

[clang] [OpenCL][NVPTX] Don't set calling convention for OpenCL kernel (PR #170170)

2025-12-01 Thread Hongyu Chen via cfe-commits
https://github.com/XChy updated https://github.com/llvm/llvm-project/pull/170170 >From def58994c7e783e50260be3eba888f100956797d Mon Sep 17 00:00:00 2001 From: XChy Date: Tue, 2 Dec 2025 00:42:10 +0800 Subject: [PATCH 1/4] precommit tests --- clang/test/CodeGenOpenCL/ptx-calls.cl | 19 +

[clang] [llvm] [Offloading] Extend OffloadBinary format to support multiple metadata entries (PR #169425)

2025-12-01 Thread Yury Plyakhin via cfe-commits
@@ -82,76 +116,79 @@ class OffloadBinary : public Binary { LLVM_ABI static Expected> create(MemoryBufferRef); - /// Serialize the contents of \p File to a binary buffer to be read later. - LLVM_ABI static SmallString<0> write(const OffloadingImage &); + /// Serializ

[clang] [llvm] [Offloading] Extend OffloadBinary format to support multiple metadata entries (PR #169425)

2025-12-01 Thread Joseph Huber via cfe-commits
@@ -82,76 +116,79 @@ class OffloadBinary : public Binary { LLVM_ABI static Expected> create(MemoryBufferRef); - /// Serialize the contents of \p File to a binary buffer to be read later. - LLVM_ABI static SmallString<0> write(const OffloadingImage &); + /// Serializ

[clang] [llvm] [Offloading] Extend OffloadBinary format to support multiple metadata entries (PR #169425)

2025-12-01 Thread Yury Plyakhin via cfe-commits
@@ -82,76 +116,79 @@ class OffloadBinary : public Binary { LLVM_ABI static Expected> create(MemoryBufferRef); - /// Serialize the contents of \p File to a binary buffer to be read later. - LLVM_ABI static SmallString<0> write(const OffloadingImage &); + /// Serializ

[clang] [llvm] [Offloading] Extend OffloadBinary format to support multiple metadata entries (PR #169425)

2025-12-01 Thread Yury Plyakhin via cfe-commits
@@ -82,76 +116,79 @@ class OffloadBinary : public Binary { LLVM_ABI static Expected> create(MemoryBufferRef); - /// Serialize the contents of \p File to a binary buffer to be read later. - LLVM_ABI static SmallString<0> write(const OffloadingImage &); + /// Serializ

[clang] [flang] [mlir] [MLIR] Zero-extend unsigned and 1-bit values when translating IntegerAttr (PR #169751)

2025-12-01 Thread Valentin Clement バレンタイン クレメン via cfe-commits
https://github.com/clementval approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/169751 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Offloading] Extend OffloadBinary format to support multiple metadata entries (PR #169425)

2025-12-01 Thread Yury Plyakhin via cfe-commits
YuriPlyakhin wrote: I updated OffloadBinary.h in accordance with how I understand your idea so far. https://github.com/llvm/llvm-project/pull/169425 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo

[clang] [llvm] [Offloading] Extend OffloadBinary format to support multiple metadata entries (PR #169425)

2025-12-01 Thread Yury Plyakhin via cfe-commits
https://github.com/YuriPlyakhin updated https://github.com/llvm/llvm-project/pull/169425 >From ce7ab7652cf29469a8addea8ebe67f408b4b03af Mon Sep 17 00:00:00 2001 From: "Plyakhin, Yury" Date: Tue, 25 Nov 2025 00:40:45 +0100 Subject: [PATCH 1/6] [Offloading] Extend OffloadBinary format to support

[clang] [clang] Implement -fstrict-bool (PR #160790)

2025-12-01 Thread via cfe-commits
=?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier Message-ID: In-Reply-To: @@ -0,0 +1,22 @@ +// RUN: %clang -### %s 2>&1 | FileCheck %s --check-prefix=CHECK-NONE +// RUN: %clang -### -fstrict-bool %s 2>&1 | FileCheck %s --check-prefix=CHECK-S

[clang] [llvm] [Offloading] Extend OffloadBinary format to support multiple metadata entries (PR #169425)

2025-12-01 Thread Joseph Huber via cfe-commits
@@ -82,76 +116,79 @@ class OffloadBinary : public Binary { LLVM_ABI static Expected> create(MemoryBufferRef); - /// Serialize the contents of \p File to a binary buffer to be read later. - LLVM_ABI static SmallString<0> write(const OffloadingImage &); + /// Serializ

[clang] [llvm] [Offloading] Extend OffloadBinary format to support multiple metadata entries (PR #169425)

2025-12-01 Thread Yury Plyakhin via cfe-commits
https://github.com/YuriPlyakhin edited https://github.com/llvm/llvm-project/pull/169425 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Offloading] Extend OffloadBinary format to support multiple metadata entries (PR #169425)

2025-12-01 Thread Yury Plyakhin via cfe-commits
@@ -82,76 +116,79 @@ class OffloadBinary : public Binary { LLVM_ABI static Expected> create(MemoryBufferRef); - /// Serialize the contents of \p File to a binary buffer to be read later. - LLVM_ABI static SmallString<0> write(const OffloadingImage &); + /// Serializ

[clang] [llvm] [AMDGPU] Apply alignment attr for make.buffer.rsrc (PR #166914)

2025-12-01 Thread via cfe-commits
https://github.com/Shoreshen updated https://github.com/llvm/llvm-project/pull/166914 >From 4d3d6e41cb347572b69cd84705218786a01a7b4e Mon Sep 17 00:00:00 2001 From: shore <[email protected]> Date: Fri, 7 Nov 2025 17:52:32 +0800 Subject: [PATCH 1/9] Apply alignment attr for make.buffer.rsrc --- l

[clang] [llvm] [Offloading] Extend OffloadBinary format to support multiple metadata entries (PR #169425)

2025-12-01 Thread Yury Plyakhin via cfe-commits
@@ -82,76 +116,79 @@ class OffloadBinary : public Binary { LLVM_ABI static Expected> create(MemoryBufferRef); - /// Serialize the contents of \p File to a binary buffer to be read later. - LLVM_ABI static SmallString<0> write(const OffloadingImage &); + /// Serializ

[clang] [llvm] [PowerPC][AIX] Specify correct ABI alignment for double (PR #144673)

2025-12-01 Thread Sean Fertile via cfe-commits
@@ -96,16 +96,16 @@ define double @double_va_arg(double %a, ...) local_unnamed_addr { ; CHECK-LABEL: double_va_arg: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT:addi 3, 1, 56 -; CHECK-NEXT:std 4, 56(1) -; CHECK-NEXT:std 3, -8(1) +; CHECK-NEXT:lfd 0, 56(1) ---

[clang] [CIR] Upstream CIR codegen for vec_set x86 builtin (PR #169265)

2025-12-01 Thread Jianjian Guan via cfe-commits
https://github.com/jacquesguan closed https://github.com/llvm/llvm-project/pull/169265 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 0a03b7e - [CIR] Upstream CIR codegen for vec_set x86 builtin (#169265)

2025-12-01 Thread via cfe-commits
Author: Jianjian Guan Date: 2025-12-02T10:31:50+08:00 New Revision: 0a03b7e6569ae89d55c9703faedf8e2503bcc728 URL: https://github.com/llvm/llvm-project/commit/0a03b7e6569ae89d55c9703faedf8e2503bcc728 DIFF: https://github.com/llvm/llvm-project/commit/0a03b7e6569ae89d55c9703faedf8e2503bcc728.diff

[clang] [llvm] [Offloading] Extend OffloadBinary format to support multiple metadata entries (PR #169425)

2025-12-01 Thread Joseph Huber via cfe-commits
@@ -82,76 +116,79 @@ class OffloadBinary : public Binary { LLVM_ABI static Expected> create(MemoryBufferRef); - /// Serialize the contents of \p File to a binary buffer to be read later. - LLVM_ABI static SmallString<0> write(const OffloadingImage &); + /// Serializ

[clang] [llvm] [Offloading] Extend OffloadBinary format to support multiple metadata entries (PR #169425)

2025-12-01 Thread Yury Plyakhin via cfe-commits
@@ -82,76 +116,79 @@ class OffloadBinary : public Binary { LLVM_ABI static Expected> create(MemoryBufferRef); - /// Serialize the contents of \p File to a binary buffer to be read later. - LLVM_ABI static SmallString<0> write(const OffloadingImage &); + /// Serializ

[clang] [llvm] Add release note entry for max/min (PR #131977)

2025-12-01 Thread YunQiang Su via cfe-commits
wzssyqa wrote: See: https://github.com/llvm/llvm-project/pull/168838 https://github.com/llvm/llvm-project/pull/131977 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Add release note entry for max/min (PR #131977)

2025-12-01 Thread YunQiang Su via cfe-commits
https://github.com/wzssyqa closed https://github.com/llvm/llvm-project/pull/131977 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Clang: Add nsz to llvm.minnum and llvm.maxnum emitted from fmin and fmax (PR #113133)

2025-12-01 Thread YunQiang Su via cfe-commits
https://github.com/wzssyqa closed https://github.com/llvm/llvm-project/pull/113133 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Clang: Add nsz to llvm.minnum and llvm.maxnum emitted from fmin and fmax (PR #113133)

2025-12-01 Thread YunQiang Su via cfe-commits
wzssyqa wrote: https://github.com/llvm/llvm-project/pull/168838 OK, now we decides to define `llvm.minnum` and `llvm.maxnum` as same as libm. So we don't need it now. Let's close it. https://github.com/llvm/llvm-project/pull/113133 ___ cfe-commits mai

[clang] [llvm] [Offloading] Extend OffloadBinary format to support multiple metadata entries (PR #169425)

2025-12-01 Thread Yury Plyakhin via cfe-commits
YuriPlyakhin wrote: > > > I'm wondering if we should keep the accessor methods to all take a single > > > image, so the extract code just returns an array of these. You'd need to > > > make sure the reference stays alive but it might be simpler that way, I > > > don't think the interface handl

[clang] [llvm] [Offloading] Extend OffloadBinary format to support multiple metadata entries (PR #169425)

2025-12-01 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > > I'm wondering if we should keep the accessor methods to all take a single > > image, so the extract code just returns an array of these. You'd need to > > make sure the reference stays alive but it might be simpler that way, I > > don't think the interface handles this well,

[clang] [llvm] [Offloading] Extend OffloadBinary format to support multiple metadata entries (PR #169425)

2025-12-01 Thread Yury Plyakhin via cfe-commits
YuriPlyakhin wrote: > I'm wondering if we should keep the accessor methods to all take a single > image, so the extract code just returns an array of these. You'd need to make > sure the reference stays alive but it might be simpler that way, I don't > think the interface handles this well, li

[clang] [CUDA] Add device-side kernel launch support (PR #165519)

2025-12-01 Thread via cfe-commits
@@ -0,0 +1,23 @@ +// RUN: %clang_cc1 -fcuda-is-device -verify=nordc %s +// RUN: %clang_cc1 -fcuda-is-device -fgpu-rdc -verify=rdc %s +// RUN: %clang_cc1 -x hip -fcuda-is-device -verify=hip %s + +// rdc-no-diagnostics + +#include "Inputs/cuda.h" + +__global__ void g2(int x) {} + +/

[clang] 28e2004 - [clang][CUDA] Clean up tests from device-side kernel call support. NFC

2025-12-01 Thread Michael Liao via cfe-commits
Author: Michael Liao Date: 2025-12-01T20:56:56-05:00 New Revision: 28e200495e5b39b7599846c511e61723cde2f478 URL: https://github.com/llvm/llvm-project/commit/28e200495e5b39b7599846c511e61723cde2f478 DIFF: https://github.com/llvm/llvm-project/commit/28e200495e5b39b7599846c511e61723cde2f478.diff

[clang] [Clang] Mark this pointer in destructors dead_on_return (PR #166276)

2025-12-01 Thread Aiden Grossman via cfe-commits
boomanaiden154 wrote: > Is the potential undefined behavior here checked by msan? Do we need to > disable adding this attribute if msan is enabled? Yes, use-after-destroy is checked by msan, but I don't believe we need to explicitly disable anything here to handle msan. Based on my understand,

[clang] [CIR] Only emit FP math intrinsics when precision/errno settings allow it (PR #169424)

2025-12-01 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor commented: Please be sure to pick up the changes from https://github.com/llvm/llvm-project/pull/169954 which I just committed. https://github.com/llvm/llvm-project/pull/169424 ___ cfe-commits mailing list cfe-commits@list

[clang] [CIR] Upstream Builtin FloorOp (PR #169954)

2025-12-01 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor closed https://github.com/llvm/llvm-project/pull/169954 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 91e8780 - [CIR] Upstream Builtin FloorOp (#169954)

2025-12-01 Thread via cfe-commits
Author: Letu Ren Date: 2025-12-01T16:51:08-08:00 New Revision: 91e8780424c0e7c2f11f1adfc47915f975691d87 URL: https://github.com/llvm/llvm-project/commit/91e8780424c0e7c2f11f1adfc47915f975691d87 DIFF: https://github.com/llvm/llvm-project/commit/91e8780424c0e7c2f11f1adfc47915f975691d87.diff LOG:

[clang] [llvm] [CIR] Support x86 builtin rotate (PR #169566)

2025-12-01 Thread Andy Kaylor via cfe-commits
@@ -115,6 +119,40 @@ static mlir::Value emitX86MaskLogic(CIRGenBuilderTy &builder, ops[0].getType()); } +static mlir::Value emitX86FunnelShift(CIRGenBuilderTy &builder, + mlir::Location location, mlir::Value

[clang] [CIR] Only emit FP math intrinsics when precision/errno settings allow it (PR #169424)

2025-12-01 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,75 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -emit-cir -fmath-errno %s -o %t.cir +// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR-ERRNO +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangi

[clang] [CIR] Only emit FP math intrinsics when precision/errno settings allow it (PR #169424)

2025-12-01 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,75 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -emit-cir -fmath-errno %s -o %t.cir +// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR-ERRNO +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangi

[clang] [CIR] Only emit FP math intrinsics when precision/errno settings allow it (PR #169424)

2025-12-01 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,75 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -emit-cir -fmath-errno %s -o %t.cir +// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR-ERRNO +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangi

[clang] [CIR] Upstream Emit the resume branch for cir.await op (PR #169864)

2025-12-01 Thread via cfe-commits
https://github.com/Andres-Salamanca closed https://github.com/llvm/llvm-project/pull/169864 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CUDA][HIP] Fix CTAD for host/device constructors (PR #168711)

2025-12-01 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/168711 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CUDA][HIP] Fix CTAD for host/device constructors (PR #168711)

2025-12-01 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B edited https://github.com/llvm/llvm-project/pull/168711 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream SizeOf for VariableArrayType (PR #169993)

2025-12-01 Thread Andy Kaylor via cfe-commits
@@ -2344,25 +2344,29 @@ mlir::Value ScalarExprEmitter::VisitUnaryExprOrTypeTraitExpr( } else { // C99 6.5.3.4p2: If the argument is an expression of type // VLA, it is evaluated. - cgf.getCIRGenModule().errorNYI( - e->getSource

[clang] [CIR] Upstream SizeOf for VariableArrayType (PR #169993)

2025-12-01 Thread Andy Kaylor via cfe-commits
@@ -2344,25 +2344,29 @@ mlir::Value ScalarExprEmitter::VisitUnaryExprOrTypeTraitExpr( } else { // C99 6.5.3.4p2: If the argument is an expression of type // VLA, it is evaluated. - cgf.getCIRGenModule().errorNYI( - e->getSource

[clang] [llvm] [clang][NVPTX] Add missing half-precision add/sub/fma intrinsics (PR #170079)

2025-12-01 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/170079 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][NVPTX] Add missing half-precision add/sub/fma intrinsics (PR #170079)

2025-12-01 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B edited https://github.com/llvm/llvm-project/pull/170079 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CUDA] Fix an unused variable error when compiled with optimization (PR #170205)

2025-12-01 Thread via cfe-commits
google-yfyang wrote: @rupprecht Can you take a look at this? https://github.com/llvm/llvm-project/pull/170205 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Fix bitfield_insert implementation (PR #170208)

2025-12-01 Thread Victor Mustya via cfe-commits
https://github.com/vmustya created https://github.com/llvm/llvm-project/pull/170208 The `bitfield_insert` function in the OpenCL C library had an incorrect `__CLC_BODY` definition, that included the `.inc` file for the `__clc_bitfield_insert` declaration instead of the correct implementation. So

[clang] [mlir] [CIR][OpenACC] Implement 'routine' lowering + seq clause (PR #170207)

2025-12-01 Thread Erich Keane via cfe-commits
erichkeane wrote: I'm not going to fix that clang-format failure, clang-format wants me to re-format that entire file, which I very much should not be doing. Please disregard it :) https://github.com/llvm/llvm-project/pull/170207 ___ cfe-commits mai

[clang] [flang] [llvm] [CLANG][OpenMP] Add support for OpenMP6.0 transparent clause (PR #166810)

2025-12-01 Thread Alexey Bataev via cfe-commits
@@ -1495,6 +1504,98 @@ class OMPThreadsetClause final : public OMPClause { } }; +/// This class represents the 'transparent' clause in the '#pragma omp task' +/// directive. +/// +/// \code +/// #pragma omp task transparent(omp_not_impex) +/// \endcode +/// +/// In this exam

[clang] [llvm] [CIR] Support x86 builtin rotate (PR #169566)

2025-12-01 Thread Omar Hossam via cfe-commits
https://github.com/moar55 updated https://github.com/llvm/llvm-project/pull/169566 >From 885eaa5d8a9a33e333c521e78b5a4fdcf3bd14b9 Mon Sep 17 00:00:00 2001 From: Omar Ibrahim Date: Thu, 20 Nov 2025 23:12:40 +0100 Subject: [PATCH 1/5] [CIR] Implement x86 rotate builtins --- clang/lib/CIR/CodeGe

[clang] 7b2ee46 - [CIR] Add boolean to the Complex type constraints msg (#170192)

2025-12-01 Thread via cfe-commits
Author: Amr Hesham Date: 2025-12-01T21:45:51+01:00 New Revision: 7b2ee464d278c05a0539482ecf3562649e9ea27d URL: https://github.com/llvm/llvm-project/commit/7b2ee464d278c05a0539482ecf3562649e9ea27d DIFF: https://github.com/llvm/llvm-project/commit/7b2ee464d278c05a0539482ecf3562649e9ea27d.diff LO

[clang] [CIR] Add boolean to the Complex type constraints msg (PR #170192)

2025-12-01 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper closed https://github.com/llvm/llvm-project/pull/170192 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [mlir] [MLIR] Zero-extend unsigned and 1-bit values when translating IntegerAttr (PR #169751)

2025-12-01 Thread Andy Kaylor via cfe-commits
@@ -588,10 +588,17 @@ llvm::Constant *mlir::LLVM::detail::getLLVMConstant( } // For integer types, we allow a mismatch in sizes as the index type in // MLIR might have a different size than the index type in the LLVM module. - if (auto intAttr = dyn_cast(attr)) -retu

[clang] [clang][transformer] Add `merge` range-selector for selecting the merge of two ranges. (PR #169560)

2025-12-01 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand approved this pull request. https://github.com/llvm/llvm-project/pull/169560 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] "modular_format" attribute for functions using format strings (PR #147431)

2025-12-01 Thread Erich Keane via cfe-commits
@@ -6973,6 +6973,27 @@ static void handleVTablePointerAuthentication(Sema &S, Decl *D, CustomDiscriminationValue)); } +static void handleModularFormat(Sema &S, Decl *D, const ParsedAttr &AL) { + StringRef ImplName; + if (!S.checkStringLiteralArgumentAttr(AL, 1, ImplNa

[clang] [clang] "modular_format" attribute for functions using format strings (PR #147431)

2025-12-01 Thread Erich Keane via cfe-commits
@@ -5317,3 +5317,11 @@ def NonString : InheritableAttr { let Subjects = SubjectList<[Var, Field]>; let Documentation = [NonStringDocs]; } + +def ModularFormat : InheritableAttr { + let Spellings = [Clang<"modular_format">]; + let Args = [IdentifierArgument<"ModularImplFn"

[clang] [CIR][CIRGen][Builtin][X86] Compress Store Intrinsics (PR #169648)

2025-12-01 Thread Andy Kaylor via cfe-commits
@@ -419,6 +432,7 @@ mlir::Value CIRGenFunction::emitX86BuiltinExpr(unsigned builtinID, case X86::BI__builtin_ia32_compressstoreqi128_mask: case X86::BI__builtin_ia32_compressstoreqi256_mask: case X86::BI__builtin_ia32_compressstoreqi512_mask: +return emitX86CompressS

[clang] [CIR][CIRGen][Builtin][X86] Compress Store Intrinsics (PR #169648)

2025-12-01 Thread Andy Kaylor via cfe-commits
@@ -90,6 +90,14 @@ static mlir::Value getMaskVecValue(CIRGenFunction &cgf, const CallExpr *expr, return maskVec; } +static mlir::Value emitX86CompressStore(CIRGenFunction &cgf, const CallExpr *expr, ArrayRef ops){ andykaylor wrote: ```suggestion static ml

[clang] [CIR][CIRGen][Builtin][X86] Compress Store Intrinsics (PR #169648)

2025-12-01 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor commented: Thanks for the patch! I have a few requests for changes. https://github.com/llvm/llvm-project/pull/169648 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/c

[clang] [CIR][CIRGen][Builtin][X86] Compress Store Intrinsics (PR #169648)

2025-12-01 Thread Andy Kaylor via cfe-commits
@@ -90,6 +90,14 @@ static mlir::Value getMaskVecValue(CIRGenFunction &cgf, const CallExpr *expr, return maskVec; } +static mlir::Value emitX86CompressStore(CIRGenFunction &cgf, const CallExpr *expr, ArrayRef ops){ + auto ResultTy = cast(ops[1].getType()); + mlir::Value M

[clang] [CIR][CIRGen][Builtin][X86] Compress Store Intrinsics (PR #169648)

2025-12-01 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,5 @@ +#include andykaylor wrote: This test should be moved to `clang/test/CIR/CodeGenBuiltins/X86/avx512vl-builtins.c` which is also being added in https://github.com/llvm/llvm-project/pull/169582. The test will need RUN lines and CIR, LLVM, and OG

[clang] [CIR][CIRGen][Builtin][X86] Compress Store Intrinsics (PR #169648)

2025-12-01 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor edited https://github.com/llvm/llvm-project/pull/169648 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add boolean to the Complex type constraints msg (PR #170192)

2025-12-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Amr Hesham (AmrDeveloper) Changes Update the type constraints error message to also mention the boolean type --- Full diff: https://github.com/llvm/llvm-project/pull/170192.diff 1 Files Affected: - (modified) clang/include/clang/CIR/D

[clang] [CIR] Add boolean to the Complex type constraints msg (PR #170192)

2025-12-01 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/170192 Update the type constraints error message to also mention the boolean type >From ca60a70e65fd5af5faca350b42524c30df8cb487 Mon Sep 17 00:00:00 2001 From: Amr Hesham Date: Mon, 1 Dec 2025 20:46:26 +0100 Subj

[clang] [llvm] [clang/LLVM] Add function level flatten_depth attribute for depth-limited inlining (PR #165777)

2025-12-01 Thread Grigory Pastukhov via cfe-commits
grigorypas wrote: Created RFC https://discourse.llvm.org/t/rfc-function-level-flatten-depth-attribute-for-depth-limited-inlining/89017 https://github.com/llvm/llvm-project/pull/165777 ___ cfe-commits mailing list [email protected] https://lis

[clang] [clang][docs] Add link to C++ modules Wikipedia page to docs (PR #169200)

2025-12-01 Thread via cfe-commits
https://github.com/mikomikotaishi updated https://github.com/llvm/llvm-project/pull/169200 >From 35e95966015d35af747c1a90be64e29dd83c8c51 Mon Sep 17 00:00:00 2001 From: Miko <[email protected]> Date: Sun, 23 Nov 2025 06:53:47 + Subject: [PATCH 1/5] Add link to

[clang-tools-extra] Reapply "[clangd] Enable lit internal shell by default" (PR #170186)

2025-12-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Aiden Grossman (boomanaiden154) Changes This reverts commit 4cfbc44ebe26692c209655c37aeb0b6cbf1d479b. This was failing due to a missing chmod binary on one of the bots (clangd-ubuntu-tsan). This patch fixes that by explicitly

[clang-tools-extra] Reapply "[clangd] Enable lit internal shell by default" (PR #170186)

2025-12-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangd Author: Aiden Grossman (boomanaiden154) Changes This reverts commit 4cfbc44ebe26692c209655c37aeb0b6cbf1d479b. This was failing due to a missing chmod binary on one of the bots (clangd-ubuntu-tsan). This patch fixes that by explicitly checking fo

[clang] [llvm] [Offload][Tests] Non-contiguous_update_to_tests (PR #169623)

2025-12-01 Thread Amit Tiwari via cfe-commits
https://github.com/amitamd7 ready_for_review https://github.com/llvm/llvm-project/pull/169623 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Reapply "[clangd] Enable lit internal shell by default" (PR #170186)

2025-12-01 Thread Aiden Grossman via cfe-commits
https://github.com/boomanaiden154 created https://github.com/llvm/llvm-project/pull/170186 This reverts commit 4cfbc44ebe26692c209655c37aeb0b6cbf1d479b. This was failing due to a missing chmod binary on one of the bots (clangd-ubuntu-tsan). This patch fixes that by explicitly checking for the

[clang] [llvm] [CIR] Support x86 builtin rotate (PR #169566)

2025-12-01 Thread Andy Kaylor via cfe-commits
@@ -90,6 +92,41 @@ static mlir::Value getMaskVecValue(CIRGenFunction &cgf, const CallExpr *expr, return maskVec; } +static mlir::Value emitX86FunnelShift(CIRGenFunction &cgf, const CallExpr *e, + mlir::Value &op0, mlir::Value &op1, +

[clang] [compiler-rt] [llvm] [TySan] Make TySan compatible with UBSan (PR #169036)

2025-12-01 Thread Nathan Corbyn via cfe-commits
cofibrant wrote: CC @DanBlackwell, this patch looks the same as the patch you proposed internally https://github.com/llvm/llvm-project/pull/169036 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/c

[clang] [llvm] [CIR] Support x86 builtin rotate (PR #169566)

2025-12-01 Thread Andy Kaylor via cfe-commits
@@ -77,3 +77,36 @@ __m512i test_mm512_undefined_epi32(void) { // OGCG: ret <8 x i64> zeroinitializer return _mm512_undefined_epi32(); } + +__m512i test_mm512_ror_epi32(__m512i __A) { + // CIR-LABEL: test_mm512_ror_epi32 + // CIR: {{%.*}} = cir.cast integral {{%.*}} : !s3

  1   2   3   4   5   >