[clang] [AArch64][SME2] Add SQRSHRN, UQRSHRN, SQRSHRUN builtins for SME2, SVE2p1 (PR #75325)

2023-12-14 Thread Jay Foad via cfe-commits
jayfoad wrote: Please remember to add a suitable `REQUIRES:` line to these new codegen tests, or put them in an `ARM` subdirectory with a suitable `lit.local.cfg`! This new test is failing in non-ARM builds with: ``` FAIL: Clang :: CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_qrshr.c (5567 of

[clang] 50e78de - [AArch64][SME2] Add REQUIRES to new test

2023-12-14 Thread Jay Foad via cfe-commits
Author: Jay Foad Date: 2023-12-14T13:20:37Z New Revision: 50e78de76a5e77e15ddea48dfb520d6bbcbc1c45 URL: https://github.com/llvm/llvm-project/commit/50e78de76a5e77e15ddea48dfb520d6bbcbc1c45 DIFF: https://github.com/llvm/llvm-project/commit/50e78de76a5e77e15ddea48dfb520d6bbcbc1c45.diff LOG: [AAr

[clang] [AArch64][SME2] Add SQRSHRN, UQRSHRN, SQRSHRUN builtins for SME2, SVE2p1 (PR #75325)

2023-12-14 Thread Jay Foad via cfe-commits
jayfoad wrote: > Please remember to add a suitable `REQUIRES:` line to these new codegen tests I've added one in 50e78de76a5e77e15ddea48dfb520d6bbcbc1c45 https://github.com/llvm/llvm-project/pull/75325 ___ cfe-commits mailing list cfe-commits@lists.ll

[clang] [Driver] Remove all vendor triples (PR #75459)

2023-12-14 Thread Andreas Schwab via cfe-commits
andreas-schwab wrote: pr/74513 https://github.com/llvm/llvm-project/pull/75459 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][wasm] Resolve assertion errors caused by converting ComplexTy… (PR #70496)

2023-12-14 Thread via cfe-commits
https://github.com/knightXun updated https://github.com/llvm/llvm-project/pull/70496 >From e0ce1bab37de863d32d5d2e9b97f8bc345ef9ad9 Mon Sep 17 00:00:00 2001 From: xuknight Date: Sat, 28 Oct 2023 02:52:43 +0800 Subject: [PATCH 1/2] [clang][wasm] Resolve assertion errors caused by converting Com

[llvm] [clang] [Clang][SME2] Add builtins for moving multi-vectors to/from ZA (PR #71191)

2023-12-14 Thread David Sherwood via cfe-commits
https://github.com/david-arm approved this pull request. LGTM! I had one minor comment, but I won't hold up the patch for it. https://github.com/llvm/llvm-project/pull/71191 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[clang] [llvm] [Clang][SME2] Add builtins for moving multi-vectors to/from ZA (PR #71191)

2023-12-14 Thread David Sherwood via cfe-commits
https://github.com/david-arm edited https://github.com/llvm/llvm-project/pull/71191 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][SME2] Add builtins for moving multi-vectors to/from ZA (PR #71191)

2023-12-14 Thread David Sherwood via cfe-commits
@@ -299,6 +299,44 @@ multiclass ZAAddSub { defm SVADD : ZAAddSub<"add">; defm SVSUB : ZAAddSub<"sub">; +// SME2 - MOVA + +// +// Single, 2 and 4 vector-group read/write intrinsics. +// + +multiclass ZAWrite_VG checks> { + def NAME # _VG2_H : Inst<"svwrite_hor_" # n # "_vg2",

[clang] Warns about using printf %p for nullptr (PR #75472)

2023-12-14 Thread via cfe-commits
https://github.com/wenpen created https://github.com/llvm/llvm-project/pull/75472 Resolve https://github.com/llvm/llvm-project/issues/43453 >From 98d34426d47ca57873532855fa761b9e5aa2e193 Mon Sep 17 00:00:00 2001 From: wenpen <645124...@qq.com> Date: Thu, 14 Dec 2023 21:14:44 +0800 Subject: [PAT

[clang] Warns about using printf %p for nullptr (PR #75472)

2023-12-14 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 i

[clang] Warns about using printf %p for nullptr (PR #75472)

2023-12-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: axp (wenpen) Changes Resolve https://github.com/llvm/llvm-project/issues/43453 --- Full diff: https://github.com/llvm/llvm-project/pull/75472.diff 2 Files Affected: - (modified) clang/lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp (+103

[clang] Warns about using printf %p for nullptr (PR #75472)

2023-12-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: axp (wenpen) Changes Resolve https://github.com/llvm/llvm-project/issues/43453 --- Full diff: https://github.com/llvm/llvm-project/pull/75472.diff 2 Files Affected: - (modified) clang/lib/StaticAnalyzer/Checkers/UnixAP

[llvm] [clang] [IR] Fix GEP offset computations for vector GEPs (PR #75448)

2023-12-14 Thread Nikita Popov via cfe-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/75448 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [IR] Fix GEP offset computations for vector GEPs (PR #75448)

2023-12-14 Thread Nikita Popov via cfe-commits
@@ -108,7 +143,23 @@ class generic_gep_type_iterator { // that. bool isStruct() const { return isa(CurTy); } - bool isSequential() const { return isa(CurTy); } + bool isVector() const { return isa(CurTy); } + bool isSequential() const { return !isStruct(); } + + // For

[clang] [llvm] [IR] Fix GEP offset computations for vector GEPs (PR #75448)

2023-12-14 Thread Nikita Popov via cfe-commits
@@ -111,6 +111,20 @@ define void @test_evaluate_gep_as_ptrs_array(ptr addrspace(2) %B) { ret void } +define void @test_overaligned_vec(i8 %B) { +; This should be turned into a constexpr instead of being an instruction +; CHECK-LABEL: @test_overaligned_vec( +; TODO:

[clang] [llvm] [IR] Fix GEP offset computations for vector GEPs (PR #75448)

2023-12-14 Thread Nikita Popov via cfe-commits
https://github.com/nikic commented: Looks fine to me. Alternative would be to forbid GEP indexing into vectors entirely. https://github.com/llvm/llvm-project/pull/75448 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [clang][dataflow] Strengthen pointer comparison. (PR #75170)

2023-12-14 Thread via cfe-commits
martinboehme wrote: Heads up: I'm holding off on merging this patch because it makes some tests in the [Crubit nullability analysis](https://github.com/google/crubit/tree/main/nullability) fail. I'm still investigating exactly why this is. https://github.com/llvm/llvm-project/pull/75170 _

[clang] [clang] Report narrowing conversions with const references (PR #75332)

2023-12-14 Thread Mariya Podchishchaeva via cfe-commits
@@ -10431,7 +10437,7 @@ static void DiagnoseNarrowingInInitList(Sema &S, : diag::warn_init_list_type_narrowing) << PostInit->getSourceRange() << PreNarrowingType.getLocalUnqualifiedType() -<< EntityType.getLocalUnq

[clang] [clang] Accept recursive non-dependent calls to functions with deduced return type (PR #75456)

2023-12-14 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/75456 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Report narrowing conversions with const references (PR #75332)

2023-12-14 Thread Erich Keane via cfe-commits
@@ -10431,7 +10437,7 @@ static void DiagnoseNarrowingInInitList(Sema &S, : diag::warn_init_list_type_narrowing) << PostInit->getSourceRange() << PreNarrowingType.getLocalUnqualifiedType() -<< EntityType.getLocalUnq

[clang] [Clang][SVE2.1] Add intrinsics for `WHILEcc` resulting in predicate pair (PR #75107)

2023-12-14 Thread via cfe-commits
https://github.com/CarolineConcatto approved this pull request. https://github.com/llvm/llvm-project/pull/75107 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][SVE2.1] Make a part of the name optional for `svwhileXX` builtins with predicate-as-counter (PR #75200)

2023-12-14 Thread via cfe-commits
https://github.com/CarolineConcatto approved this pull request. https://github.com/llvm/llvm-project/pull/75200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [flang] [clang] [llvm] [flang] GETLOG runtime and extension implementation: get login username (PR #74628)

2023-12-14 Thread Yi Wu via cfe-commits
https://github.com/yi-wu-arm updated https://github.com/llvm/llvm-project/pull/74628 >From 0e98aa7ca15b05b91813eaeeb6ae1305e5f5384d Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Mon, 6 Nov 2023 19:49:13 + Subject: [PATCH 01/31] GETLOG runtime and extension implementation: get login username

[clang] [Clang][AArch64]Add QCVTN builtin to SVE2.1 (PR #75454)

2023-12-14 Thread via cfe-commits
https://github.com/CarolineConcatto updated https://github.com/llvm/llvm-project/pull/75454 >From 3508b4fbd9b4b9b51553a590b237e443fb58e098 Mon Sep 17 00:00:00 2001 From: Caroline Concatto Date: Thu, 14 Dec 2023 09:50:36 + Subject: [PATCH 1/3] [Clang][AArch64]Add QCVTN builtin to SVE2.1 ``

[clang] [llvm] [AMDGPU][GFX12] Add new v_permlane16 variants (PR #75475)

2023-12-14 Thread Mariusz Sikora via cfe-commits
https://github.com/mariusz-sikora-at-amd created https://github.com/llvm/llvm-project/pull/75475 None >From c878aa8f2e331cf8c88ab6e191db663ed56d9ce7 Mon Sep 17 00:00:00 2001 From: Mariusz Sikora Date: Thu, 14 Dec 2023 11:13:36 +0100 Subject: [PATCH] [AMDGPU][GFX12] Add new v_permlane16 variant

[clang] [llvm] [AMDGPU][GFX12] Add new v_permlane16 variants (PR #75475)

2023-12-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Mariusz Sikora (mariusz-sikora-at-amd) Changes --- Patch is 75.67 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/75475.diff 19 Files Affected: - (modified) clang/include/clang/Basic/Builtin

[clang] [llvm] [AMDGPU][GFX12] Add new v_permlane16 variants (PR #75475)

2023-12-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-mc @llvm/pr-subscribers-llvm-analysis Author: Mariusz Sikora (mariusz-sikora-at-amd) Changes --- Patch is 75.67 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/75475.diff 19 Files Affected: - (modified) c

[clang] [OpenMP] Introduce -fopenmp-force-usm flag (PR #75468)

2023-12-14 Thread Joseph Huber via cfe-commits
@@ -129,6 +129,22 @@ AMDGPUOpenMPToolChain::GetCXXStdlibType(const ArgList &Args) const { void AMDGPUOpenMPToolChain::AddClangSystemIncludeArgs( const ArgList &DriverArgs, ArgStringList &CC1Args) const { HostTC.AddClangSystemIncludeArgs(DriverArgs, CC1Args); + + CC1Args

[clang] [clang] Report narrowing conversions with const references (PR #75332)

2023-12-14 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon edited https://github.com/llvm/llvm-project/pull/75332 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP] Introduce -fopenmp-force-usm flag (PR #75468)

2023-12-14 Thread Jan Patrick Lehr via cfe-commits
@@ -129,6 +129,22 @@ AMDGPUOpenMPToolChain::GetCXXStdlibType(const ArgList &Args) const { void AMDGPUOpenMPToolChain::AddClangSystemIncludeArgs( const ArgList &DriverArgs, ArgStringList &CC1Args) const { HostTC.AddClangSystemIncludeArgs(DriverArgs, CC1Args); + + CC1Args

[clang] [OpenMP] Introduce -fopenmp-force-usm flag (PR #75468)

2023-12-14 Thread Joseph Huber via cfe-commits
@@ -129,6 +129,22 @@ AMDGPUOpenMPToolChain::GetCXXStdlibType(const ArgList &Args) const { void AMDGPUOpenMPToolChain::AddClangSystemIncludeArgs( const ArgList &DriverArgs, ArgStringList &CC1Args) const { HostTC.AddClangSystemIncludeArgs(DriverArgs, CC1Args); + + CC1Args

[clang] [OpenMP] Introduce -fopenmp-force-usm flag (PR #75468)

2023-12-14 Thread Joseph Huber via cfe-commits
@@ -3381,6 +3381,8 @@ def fopenmp_cuda_blocks_per_sm_EQ : Joined<["-"], "fopenmp-cuda-blocks-per-sm="> Flags<[NoArgumentUnused, HelpHidden]>, Visibility<[ClangOption, CC1Option]>; def fopenmp_cuda_teams_reduction_recs_num_EQ : Joined<["-"], "fopenmp-cuda-teams-reduction-recs

[clang] [clang][wasm] Resolve assertion errors caused by converting ComplexTy… (PR #70496)

2023-12-14 Thread via cfe-commits
https://github.com/knightXun updated https://github.com/llvm/llvm-project/pull/70496 >From e09d1b428f0c3836e2b92df3c994375f4c946302 Mon Sep 17 00:00:00 2001 From: xuknight Date: Sat, 28 Oct 2023 02:52:43 +0800 Subject: [PATCH] [clang][wasm] Resolve assertion errors caused by converting Complex

[clang] [OpenMP][USM] Adds test for -fopenmp-force-usm flag (PR #75467)

2023-12-14 Thread Jan Patrick Lehr via cfe-commits
https://github.com/jplehr updated https://github.com/llvm/llvm-project/pull/75467 >From d3d073d7f57f2a5d06cd8c1de8c1503034af3b6b Mon Sep 17 00:00:00 2001 From: JP Lehr Date: Wed, 12 Jul 2023 05:04:41 -0400 Subject: [PATCH] [OpenMP][USM] Adds test for -fopenmp-force-usm flag This adds a basic t

[clang] [clang] Report narrowing conversions with const references (PR #75332)

2023-12-14 Thread Mariya Podchishchaeva via cfe-commits
@@ -10431,7 +10437,7 @@ static void DiagnoseNarrowingInInitList(Sema &S, : diag::warn_init_list_type_narrowing) << PostInit->getSourceRange() << PreNarrowingType.getLocalUnqualifiedType() -<< EntityType.getLocalUnq

[clang] [clang] Report narrowing conversions with const references (PR #75332)

2023-12-14 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon updated https://github.com/llvm/llvm-project/pull/75332 >From d0a7276eb8014693656d3d931616d56ffe46730c Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Wed, 13 Dec 2023 04:25:12 -0800 Subject: [PATCH 1/3] [clang] Report narrowing conversions with const

[clang] [clang] Report narrowing conversions with const references (PR #75332)

2023-12-14 Thread Erich Keane via cfe-commits
@@ -10431,7 +10437,7 @@ static void DiagnoseNarrowingInInitList(Sema &S, : diag::warn_init_list_type_narrowing) << PostInit->getSourceRange() << PreNarrowingType.getLocalUnqualifiedType() -<< EntityType.getLocalUnq

[clang] [clang] Report narrowing conversions with const references (PR #75332)

2023-12-14 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. Looks like you got what I meant anyway, and we WERE just passionately agreeing with eachother :) LGTM. https://github.com/llvm/llvm-project/pull/75332 ___ cfe-commits mailing list cfe-commits@

[clang-tools-extra] [clangd] Add test for GH75115 (PR #75116)

2023-12-14 Thread Nico Weber via cfe-commits
nico wrote: Seems like unnecessary complexity to me fwiw. So far, we've put tests for things that work in the test suite and put a record of things that assert in the bug tracker :) https://github.com/llvm/llvm-project/pull/75116 ___ cfe-commits mail

[llvm] [clang] [clang][MBD] set up module build daemon infrastructure (PR #67562)

2023-12-14 Thread Nico Weber via cfe-commits
nico wrote: This seems like something that shouldn't be in the compiler binary itself. There should be a separate binary for this type of thing. https://github.com/llvm/llvm-project/pull/67562 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[clang] [clang] Report narrowing conversions with const references (PR #75332)

2023-12-14 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: > Looks like you got what I meant anyway, and we WERE just passionately > agreeing with eachother :) LGTM. Thanks! Probably I was being a bit slow, lol https://github.com/llvm/llvm-project/pull/75332 ___ cfe-commits mailing list cfe-

[clang] 88abd53 - [clang][Interp] Allow evaluating standalone complex expressions

2023-12-14 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2023-12-14T15:07:42+01:00 New Revision: 88abd530ef8e66ba4275146ffba028aa8923bf7f URL: https://github.com/llvm/llvm-project/commit/88abd530ef8e66ba4275146ffba028aa8923bf7f DIFF: https://github.com/llvm/llvm-project/commit/88abd530ef8e66ba4275146ffba028aa8923bf7f.diff LO

[clang] [X86] Add ABI handling for __float128 (PR #75156)

2023-12-14 Thread Phoebe Wang via cfe-commits
@@ -0,0 +1,35 @@ +// RUN: %clang_cc1 -triple x86_64-linux -emit-llvm -target-feature +sse2 < %s | FileCheck %s --check-prefixes=CHECK phoebewang wrote: This patch only changes for 64-bit ABI, non-SSE is not a valid case for 64-bit. OTOH, -sse just generate iden

[clang-tools-extra] [llvm] [clang] [X86] Use plain load/store instead of cmpxchg16b for atomics with AVX (PR #74275)

2023-12-14 Thread James Y Knight via cfe-commits
jyknight wrote: Ping! https://github.com/llvm/llvm-project/pull/74275 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] atomic_compare_exchange: check failure memory order (PR #74959)

2023-12-14 Thread James Y Knight via cfe-commits
https://github.com/jyknight approved this pull request. https://github.com/llvm/llvm-project/pull/74959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP] Introduce -fopenmp-force-usm flag (PR #75468)

2023-12-14 Thread Jan Patrick Lehr via cfe-commits
@@ -3381,6 +3381,8 @@ def fopenmp_cuda_blocks_per_sm_EQ : Joined<["-"], "fopenmp-cuda-blocks-per-sm="> Flags<[NoArgumentUnused, HelpHidden]>, Visibility<[ClangOption, CC1Option]>; def fopenmp_cuda_teams_reduction_recs_num_EQ : Joined<["-"], "fopenmp-cuda-teams-reduction-recs

[clang] [Sema] atomic_compare_exchange: check failure memory order (PR #74959)

2023-12-14 Thread James Y Knight via cfe-commits
jyknight wrote: > > Did this change anything for the `scoped_atomic_compare_exchange_n` variant > > I added recently? The scoped variant(s) use the same codepath here, so they'll also verify that the failure order is valid. https://github.com/llvm/llvm-project/pull/74959 _

[clang] [OpenMP] Introduce -fopenmp-force-usm flag (PR #75468)

2023-12-14 Thread Joseph Huber via cfe-commits
@@ -3381,6 +3381,8 @@ def fopenmp_cuda_blocks_per_sm_EQ : Joined<["-"], "fopenmp-cuda-blocks-per-sm="> Flags<[NoArgumentUnused, HelpHidden]>, Visibility<[ClangOption, CC1Option]>; def fopenmp_cuda_teams_reduction_recs_num_EQ : Joined<["-"], "fopenmp-cuda-teams-reduction-recs

[clang] d16cf47 - [clang][Interp] Start implementing binary operators for complex types

2023-12-14 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2023-12-14T15:33:52+01:00 New Revision: d16cf470ac4600bb1a6b462ed843078ad65a3d93 URL: https://github.com/llvm/llvm-project/commit/d16cf470ac4600bb1a6b462ed843078ad65a3d93 DIFF: https://github.com/llvm/llvm-project/commit/d16cf470ac4600bb1a6b462ed843078ad65a3d93.diff LO

[clang] [X86] Add ABI handling for __float128 (PR #75156)

2023-12-14 Thread Simon Pilgrim via cfe-commits
@@ -0,0 +1,35 @@ +// RUN: %clang_cc1 -triple x86_64-linux -emit-llvm -target-feature +sse2 < %s | FileCheck %s --check-prefixes=CHECK RKSimon wrote: If you're dealing with it soon then handling it in a followup sounds good to me https://github.com/llvm/llvm-pr

[llvm] [mlir] [clang] [clang-tools-extra] Support for dynamic dimensions in 'tensor.splat' (PR #74626)

2023-12-14 Thread Rafael Ubal via cfe-commits
https://github.com/rafaelubalmw updated https://github.com/llvm/llvm-project/pull/74626 >From 66287c8d3d23cfd3003baf82160013514b4bedb5 Mon Sep 17 00:00:00 2001 From: Rafael Ubal Tena Date: Tue, 5 Dec 2023 22:54:16 -0500 Subject: [PATCH 1/4] Progress in 'tensor.splat' extensions --- .../mlir/D

[compiler-rt] [clang] [clang][UBSan] Add implicit conversion check for bitfields (PR #75481)

2023-12-14 Thread Axel Lundberg via cfe-commits
https://github.com/Zonotora created https://github.com/llvm/llvm-project/pull/75481 This patch implements the implicit truncation and implicit sign change checks for bitfields using UBSan. E.g., `-fsanitize=implicit-integer-truncation` and `-fsanitize=implicit-integer-sign-change`. However, r

[clang] [compiler-rt] [clang][UBSan] Add implicit conversion check for bitfields (PR #75481)

2023-12-14 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 i

[clang] [Sema] atomic_compare_exchange: check failure memory order (PR #74959)

2023-12-14 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu approved this pull request. https://github.com/llvm/llvm-project/pull/74959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Allow to pass config file to clang-tidy-diff (PR #75457)

2023-12-14 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: > Note: This file lacks a `SPDX-FileCopyrightText:` in the header. Is this on > purpose? Looks like llvm does not use SPDX-FileCopyrightText. https://llvm.org/docs/DeveloperPolicy.html#copyright As for change looks, fine but please update release notes entry in clang-tools-ext

[clang] [compiler-rt] [clang][UBSan] Add implicit conversion check for bitfields (PR #75481)

2023-12-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-codegen Author: Axel Lundberg (Zonotora) Changes This patch implements the implicit truncation and implicit sign change checks for bitfields using UBSan. E.g., `-fsanitize=implicit-integer-truncation` and `-fsanitize=im

[clang] [HLSL][Docs] Add documentation for HLSL functions (PR #75397)

2023-12-14 Thread Chris B via cfe-commits
@@ -0,0 +1,316 @@ +=== +HLSL Function Calls +=== + +.. contents:: + :local: + +Introduction + + +This document describes the design and implementation of HLSL's function call +semantics in Clang. This includes details related to argume

[clang] [HLSL][Docs] Add documentation for HLSL functions (PR #75397)

2023-12-14 Thread Chris B via cfe-commits
@@ -0,0 +1,316 @@ +=== +HLSL Function Calls +=== + +.. contents:: + :local: + +Introduction + + +This document describes the design and implementation of HLSL's function call +semantics in Clang. This includes details related to argume

[clang] Add SPIRV support to HIPAMD toolchain (PR #75357)

2023-12-14 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: > > > > Is generic the best name here? I feel like that's going to be heavily > > > > overloaded. I'd much prefer a new architecture that just treats > > > > "SPIR-V" as a single architecture. E.g. `--offload-arch=spirv` or > > > > something. > > > > > > For HIPAMD toolchain,

[clang] [HLSL][Docs] Add documentation for HLSL functions (PR #75397)

2023-12-14 Thread Chris B via cfe-commits
@@ -0,0 +1,316 @@ +=== +HLSL Function Calls +=== + +.. contents:: + :local: + +Introduction + + +This document describes the design and implementation of HLSL's function call +semantics in Clang. This includes details related to argume

[clang] Add SPIRV support to HIPAMD toolchain (PR #75357)

2023-12-14 Thread Yaxun Liu via cfe-commits
@@ -209,6 +210,13 @@ void AMDGCN::Linker::ConstructJob(Compilation &C, const JobAction &JA, if (JA.getType() == types::TY_LLVM_BC) return constructLlvmLinkCommand(C, JA, Inputs, Output, Args); + if (Args.getLastArgValue(options::OPT_mcpu_EQ) == "generic") { +llvm::

[llvm] [clang] [IR] Fix GEP offset computations for vector GEPs (PR #75448)

2023-12-14 Thread Jannik Silvanus via cfe-commits
https://github.com/jasilvanus updated https://github.com/llvm/llvm-project/pull/75448 >From 2c367fba42b716d803ee088af45c1b57fe4bcbcd Mon Sep 17 00:00:00 2001 From: Jannik Silvanus Date: Thu, 14 Dec 2023 09:24:51 +0100 Subject: [PATCH 1/4] [InstCombine] Precommit test exhibiting miscompile Inst

[clang] [Clang][SVE2.1] Make a part of the name optional for `svwhileXX` builtins with predicate-as-counter (PR #75200)

2023-12-14 Thread Kerry McLaughlin via cfe-commits
@@ -1,12 +1,20 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve2p1 -S -O1 -Werror -Wall -emit-llvm -o - %s | FileCheck %s // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -t

[llvm] [clang] [IR] Fix GEP offset computations for vector GEPs (PR #75448)

2023-12-14 Thread Jannik Silvanus via cfe-commits
@@ -108,7 +143,23 @@ class generic_gep_type_iterator { // that. bool isStruct() const { return isa(CurTy); } - bool isSequential() const { return isa(CurTy); } + bool isVector() const { return isa(CurTy); } + bool isSequential() const { return !isStruct(); } + + // For

[llvm] [clang] [IR] Fix GEP offset computations for vector GEPs (PR #75448)

2023-12-14 Thread Jannik Silvanus via cfe-commits
https://github.com/jasilvanus updated https://github.com/llvm/llvm-project/pull/75448 >From 2c367fba42b716d803ee088af45c1b57fe4bcbcd Mon Sep 17 00:00:00 2001 From: Jannik Silvanus Date: Thu, 14 Dec 2023 09:24:51 +0100 Subject: [PATCH 1/5] [InstCombine] Precommit test exhibiting miscompile Inst

[llvm] [clang] [IR] Fix GEP offset computations for vector GEPs (PR #75448)

2023-12-14 Thread Jannik Silvanus via cfe-commits
@@ -111,6 +111,20 @@ define void @test_evaluate_gep_as_ptrs_array(ptr addrspace(2) %B) { ret void } +define void @test_overaligned_vec(i8 %B) { +; This should be turned into a constexpr instead of being an instruction +; CHECK-LABEL: @test_overaligned_vec( +; TODO:

[clang] [HLSL][Docs] Add documentation for HLSL functions (PR #75397)

2023-12-14 Thread Chris B via cfe-commits
https://github.com/llvm-beanz updated https://github.com/llvm/llvm-project/pull/75397 >From 4ebc0c58dc751f422de85b0909636cb1a87f8ce4 Mon Sep 17 00:00:00 2001 From: Chris Bieneman Date: Wed, 13 Dec 2023 16:44:09 -0600 Subject: [PATCH 1/4] [HLSL][Docs] Add documentation for HLSL functions This a

[clang] [flang][driver] Don't use -whole-archive on Darwin (PR #75393)

2023-12-14 Thread via cfe-commits
kkwli wrote: I build and `check-flang` on `arm64-apple-darwin22.6.0`. `Driver/no-duplicate-main.f90` fails in the 3rd RUN. The test passes with HEAD. ``` kelvin@neutrino2 build % /Users/kelvin/wrk/llvm/tmp/build/bin/flang-new -o /Users/kelvin/wrk/llvm/tmp/build/tools/flang/test/Driver/Output/n

[clang] [HLSL][Docs] Add documentation for HLSL functions (PR #75397)

2023-12-14 Thread Chris B via cfe-commits
llvm-beanz wrote: @rjmccall, I'm curious if you have any thoughts on the proposed implementation approach here? The TL;DR for the gnarly bit is to have AST nodes representing parameters that need temporary values, and for "output" parameters where there may be cast sequences involved the AST

[llvm] [clang] [IR] Fix GEP offset computations for vector GEPs (PR #75448)

2023-12-14 Thread Jannik Silvanus via cfe-commits
jasilvanus wrote: > Alternative would be to forbid GEP indexing into vectors entirely. I agree that it would be better if there just were no vector GEPs, but that breaks importing older modules, and that cannot be easily auto-upgraded (convert to byte-GEPs?). Even worse, DXIL uses different ve

[clang] Add SPIRV support to HIPAMD toolchain (PR #75357)

2023-12-14 Thread Yaxun Liu via cfe-commits
@@ -209,6 +210,13 @@ void AMDGCN::Linker::ConstructJob(Compilation &C, const JobAction &JA, if (JA.getType() == types::TY_LLVM_BC) return constructLlvmLinkCommand(C, JA, Inputs, Output, Args); + if (Args.getLastArgValue(options::OPT_mcpu_EQ) == "generic") { +llvm::

[libcxx] [clang] [PowerPC] Emit libcall to frexpl for calls to frexp(ppcDoublDouble) (PR #75226)

2023-12-14 Thread Lei Huang via cfe-commits
https://github.com/lei137 updated https://github.com/llvm/llvm-project/pull/75226 >From 2e6a96f141cd103fa40b6926c1d9f0af58c6e72b Mon Sep 17 00:00:00 2001 From: Lei Huang Date: Tue, 12 Dec 2023 10:58:34 -0600 Subject: [PATCH 1/2] [PowerPC] Emit libcall to frexpl for calls to frexp(ppcDoublDoubl

[clang] [Clang][SVE2.1] Make a part of the name optional for `svwhileXX` builtins with predicate-as-counter (PR #75200)

2023-12-14 Thread Momchil Velikov via cfe-commits
@@ -1,12 +1,20 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve2p1 -S -O1 -Werror -Wall -emit-llvm -o - %s | FileCheck %s // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -t

[clang-tools-extra] [mlir] [llvm] [clang] Support for dynamic dimensions in 'tensor.splat' (PR #74626)

2023-12-14 Thread Rafael Ubal via cfe-commits
https://github.com/rafaelubalmw updated https://github.com/llvm/llvm-project/pull/74626 >From 66287c8d3d23cfd3003baf82160013514b4bedb5 Mon Sep 17 00:00:00 2001 From: Rafael Ubal Tena Date: Tue, 5 Dec 2023 22:54:16 -0500 Subject: [PATCH 1/5] Progress in 'tensor.splat' extensions --- .../mlir/D

[clang] [clang][dataflow] Fix an issue with `Environment::getResultObjectLocation()`. (PR #75483)

2023-12-14 Thread via cfe-commits
https://github.com/martinboehme created https://github.com/llvm/llvm-project/pull/75483 So far, if there was a chain of record type prvalues, `getResultObjectLocation()` would assign a different result object location to each one. This makes no sense, of course, as all of these prvalues end up i

[clang] [clang][dataflow] Fix an issue with `Environment::getResultObjectLocation()`. (PR #75483)

2023-12-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (martinboehme) Changes So far, if there was a chain of record type prvalues, `getResultObjectLocation()` would assign a different result object location to each one. This makes no sense, of course, as all of these prvalues end up initi

[clang-tools-extra] 732bccb - Use StringRef::{starts, ends}_with (NFC)

2023-12-14 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2023-12-14T07:53:20-08:00 New Revision: 732bccb8c1b4ea724919db6ff02b1188e20850e7 URL: https://github.com/llvm/llvm-project/commit/732bccb8c1b4ea724919db6ff02b1188e20850e7 DIFF: https://github.com/llvm/llvm-project/commit/732bccb8c1b4ea724919db6ff02b1188e20850e7.diff L

[clang] [clang][Interp] Support __real/__imag on primitives (PR #75485)

2023-12-14 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/75485 None >From 52ccfe01b9ee77bfa7fd13d11a8bf2ddc7034520 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 14 Dec 2023 16:50:22 +0100 Subject: [PATCH] [clang][Interp] Support __real/__imag on p

[clang] [clang][Interp] Support __real/__imag on primitives (PR #75485)

2023-12-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/75485.diff 2 Files Affected: - (modified) clang/lib/AST/Interp/ByteCodeExprGen.cpp (+7) - (modified) clang/test/AST/Interp/complex.cpp (+6) ```

[clang] [llvm] [clang][AArch64] Add a -mbranch-protection option to enable GCS (PR #75486)

2023-12-14 Thread John Brawn via cfe-commits
https://github.com/john-brawn-arm created https://github.com/llvm/llvm-project/pull/75486 -mbranch-protection=gcs (enabled by -mbranch-protection=standard) causes generated objects to be marked with the gcs feature. This is done via the guarded-control-stack module flag, in a similar way to b

[clang] [llvm] [clang][AArch64] Add a -mbranch-protection option to enable GCS (PR #75486)

2023-12-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver @llvm/pr-subscribers-clang Author: John Brawn (john-brawn-arm) Changes -mbranch-protection=gcs (enabled by -mbranch-protection=standard) causes generated objects to be marked with the gcs feature. This is done via the guarded-control-stack

[llvm] [clang] [clang][AArch64] Add a -mbranch-protection option to enable GCS (PR #75486)

2023-12-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-aarch64 Author: John Brawn (john-brawn-arm) Changes -mbranch-protection=gcs (enabled by -mbranch-protection=standard) causes generated objects to be marked with the gcs feature. This is done via the guarded-control-stack module flag, in a simil

[llvm] [clang] [clang][MBD] set up module build daemon infrastructure (PR #67562)

2023-12-14 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: > This seems like something that shouldn't be in the compiler binary itself. > There should be a separate binary for this type of thing. Discussed here: https://discourse.llvm.org/t/rfc-modules-build-daemon-build-system-agnostic-support-for-explicitly-built-modules/71524 h

[clang] [clang][dataflow] Fix an issue with `Environment::getResultObjectLocation()`. (PR #75483)

2023-12-14 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand edited https://github.com/llvm/llvm-project/pull/75483 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Fix an issue with `Environment::getResultObjectLocation()`. (PR #75483)

2023-12-14 Thread Yitzhak Mandelbaum via cfe-commits
@@ -726,27 +726,69 @@ void Environment::setStorageLocation(const Expr &E, StorageLocation &Loc) { // so allow these as an exception. assert(E.isGLValue() || E.getType()->isSpecificBuiltinType(BuiltinType::BuiltinFn)); - setStorageLocationInternal(E, Loc); + cons

[clang] [clang][dataflow] Fix an issue with `Environment::getResultObjectLocation()`. (PR #75483)

2023-12-14 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand approved this pull request. https://github.com/llvm/llvm-project/pull/75483 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Fix an issue with `Environment::getResultObjectLocation()`. (PR #75483)

2023-12-14 Thread Yitzhak Mandelbaum via cfe-commits
@@ -726,27 +726,69 @@ void Environment::setStorageLocation(const Expr &E, StorageLocation &Loc) { // so allow these as an exception. assert(E.isGLValue() || E.getType()->isSpecificBuiltinType(BuiltinType::BuiltinFn)); - setStorageLocationInternal(E, Loc); + cons

[clang] [AArch64][SME] Warn when using a streaming builtin from a non-streaming function (PR #75487)

2023-12-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Sam Tebbs (SamTebbs33) Changes This PR adds a warning that's emitted when a non-streaming or non-streaming-compatible builtin is called in an unsuitable function. Uses work by Kerry McLaughlin. This is a re-upload of #74064 and fixes a c

[clang] [AArch64][SME] Warn when using a streaming builtin from a non-streaming function (PR #75487)

2023-12-14 Thread Sam Tebbs via cfe-commits
SamTebbs33 wrote: Commit [6dc8fa2](https://github.com/llvm/llvm-project/pull/75487/commits/6dc8fa2c89159d234d9477358dd1ce1cbf059865) is the only one with new content. [d9a8da1](https://github.com/llvm/llvm-project/pull/75487/commits/d9a8da139e93f0b3259cb22d7f4c55ed46f9f265) is the exact same

[clang] [AArch64][SME] Warn when using a streaming builtin from a non-streaming function (PR #75487)

2023-12-14 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 2952bc3384412ca67fd1dcd2eac595088d692802 6dc8fa2c89159d234d9477358dd1ce1cbf059865 --

[clang] [AArch64][SME] Warn when using a streaming builtin from a non-streaming function (PR #74064)

2023-12-14 Thread Sam Tebbs via cfe-commits
SamTebbs33 wrote: New PR at https://github.com/llvm/llvm-project/pull/75487 https://github.com/llvm/llvm-project/pull/74064 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[lld] [compiler-rt] [libc] [clang] [libcxx] [lldb] [flang] [mlir] [llvm] [clang-tools-extra] [AMDGPU] GFX12: Add Split Workgroup Barrier (PR #74836)

2023-12-14 Thread Jay Foad via cfe-commits
@@ -684,6 +684,51 @@ s_rndne_f16 s5, 0xfe0b s_rndne_f16 s5, 0x3456 // GFX12: encoding: [0xff,0x6e,0x85,0xbe,0x56,0x34,0x00,0x00] +s_barrier_signal -2 jayfoad wrote: Missing `s_get_barrier_state` tests in this file? https://github.com/llvm/llvm-project/pull/7

[clang] [Clang][SVE2.1] Make a part of the name optional for `svwhileXX` builtins with predicate-as-counter (PR #75200)

2023-12-14 Thread Kerry McLaughlin via cfe-commits
@@ -1,12 +1,20 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve2p1 -S -O1 -Werror -Wall -emit-llvm -o - %s | FileCheck %s // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -t

[llvm] [libcxx] [clang] [clang-tools-extra] [lldb] [libc] [flang] [mlir] [compiler-rt] [lld] [AMDGPU] GFX12: Add Split Workgroup Barrier (PR #74836)

2023-12-14 Thread Mariusz Sikora via cfe-commits
@@ -684,6 +684,51 @@ s_rndne_f16 s5, 0xfe0b s_rndne_f16 s5, 0x3456 // GFX12: encoding: [0xff,0x6e,0x85,0xbe,0x56,0x34,0x00,0x00] +s_barrier_signal -2 mariusz-sikora-at-amd wrote: Thanks ! https://github.com/llvm/llvm-project/pull/74836 __

[libcxx] [llvm] [clang] [libc] [flang] [mlir] [libc++][memory] P1132R8: out_ptr - a scalable output pointer abstraction (PR #73618)

2023-12-14 Thread Louis Dionne via cfe-commits
https://github.com/ldionne requested changes to this pull request. https://github.com/llvm/llvm-project/pull/73618 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[mlir] [llvm] [clang] [libc] [libcxx] [flang] [libc++][memory] P1132R8: out_ptr - a scalable output pointer abstraction (PR #73618)

2023-12-14 Thread Louis Dionne via cfe-commits
@@ -0,0 +1,102 @@ +// -*- 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

[llvm] [flang] [libcxx] [clang] [libc] [mlir] [libc++][memory] P1132R8: out_ptr - a scalable output pointer abstraction (PR #73618)

2023-12-14 Thread Louis Dionne via cfe-commits
@@ -0,0 +1,102 @@ +// -*- 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

[mlir] [libcxx] [clang] [libc] [llvm] [flang] [libc++][memory] P1132R8: out_ptr - a scalable output pointer abstraction (PR #73618)

2023-12-14 Thread Louis Dionne via cfe-commits
@@ -242,6 +248,57 @@ auto to_address(const _Pointer& __p) noexcept -> decltype(std::__to_address(__p) } #endif +#if _LIBCPP_STD_VER >= 23 + +template +struct __pointer_of {}; + +template + requires(__has_pointer<_Tp>::value) +struct __pointer_of<_Tp> { + using type = type

[llvm] [mlir] [libc] [libcxx] [clang] [flang] [libc++][memory] P1132R8: out_ptr - a scalable output pointer abstraction (PR #73618)

2023-12-14 Thread Louis Dionne via cfe-commits
@@ -0,0 +1,201 @@ +//===--===// +// +// 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: Apa

[flang] [clang] [libc] [llvm] [mlir] [libcxx] [libc++][memory] P1132R8: out_ptr - a scalable output pointer abstraction (PR #73618)

2023-12-14 Thread Louis Dionne via cfe-commits
@@ -0,0 +1,97 @@ +// -*- 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-

<    1   2   3   4   >