[clang] [Clang][NEON] Add neon target guard to intrinsics (PR #98624)

2024-07-15 Thread via cfe-commits
@@ -0,0 +1,33 @@ +// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +dotprod -target-feature +fullfp16 -target-feature +fp16fml -target-feature +i8mm -target-feature +bf16 -verify -emit-llvm -o - %s + +// This test is testing the diagnostics that Clang emits whe

[clang] [Clang][NEON] Add neon target guard to intrinsics (PR #98624)

2024-07-15 Thread via cfe-commits
@@ -289,7 +289,7 @@ def SPLATQ : WInst<"splat_laneq", ".(!Q)I", "UcUsUicsilPcPsfQUcQUsQUiQcQsQiQPcQPsQflUlQlQUlhdQhQdPlQPl"> { let isLaneQ = 1; } -let TargetGuard = "bf16" in { +let TargetGuard = "bf16,neon" in { CarolineConcatto wrote: D

[clang-tools-extra] [clang-doc] add ftime profiling (PR #97644)

2024-07-15 Thread via cfe-commits
@@ -681,6 +683,7 @@ llvm::Error ClangDocBitcodeReader::readRecord(unsigned ID, Reference *I) { // Read a block of records into a single info. template llvm::Error ClangDocBitcodeReader::readBlock(unsigned ID, T I) { + llvm::TimeTraceScope("readBlock", "ClangDocBitcodeReader"

[clang] [llvm] [mlir] Remove the `x86_mmx` IR type. (PR #98505)

2024-07-15 Thread Matt Arsenault via cfe-commits
@@ -1,9 +0,0 @@ -; RUN: llvm-as < %s | llvm-dis | FileCheck %s -; RUN: verify-uselistorder %s -; Basic smoke test for x86_mmx type. - -; CHECK: define x86_mmx @sh16 -define x86_mmx @sh16(x86_mmx %A) { arsenm wrote: I'd expect this to require movement to a bitcod

[clang-tools-extra] [clang-doc] add ftime profiling (PR #97644)

2024-07-15 Thread via cfe-commits
https://github.com/PeterChou1 updated https://github.com/llvm/llvm-project/pull/97644 >From cbb9d73b4827206ea7f5da58cc4a765a9297d620 Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Thu, 4 Jul 2024 03:39:22 -0400 Subject: [PATCH 1/6] [clang-doc] add ftime trace --- clang-tools-extra/clang-doc/

[clang-tools-extra] [clang-doc] add ftime profiling (PR #97644)

2024-07-15 Thread via cfe-commits
https://github.com/PeterChou1 updated https://github.com/llvm/llvm-project/pull/97644 >From cbb9d73b4827206ea7f5da58cc4a765a9297d620 Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Thu, 4 Jul 2024 03:39:22 -0400 Subject: [PATCH 1/6] [clang-doc] add ftime trace --- clang-tools-extra/clang-doc/

[clang] [llvm] [Clang][LLVM][AArch64] Add intrinsic for MOVT SME2 instruction (PR #97602)

2024-07-15 Thread Momchil Velikov via cfe-commits
@@ -3278,10 +3278,50 @@ class sme2_movt_zt_to_zt opc> let Inst{4-0} = Zt; } -multiclass sme2_movt_zt_to_zt opc> { +multiclass sme2_movt_zt_to_zt opc, SDPatternOperator intrinsic_lane, SDPatternOperator intrinsic> { def NAME : sme2_movt_zt_to_zt; + def NAME # _PSEUDO +

[clang] [PS4/PS5][NFC] Split PScpu::Linker into PS4/PS5 classes (PR #98884)

2024-07-15 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd created https://github.com/llvm/llvm-project/pull/98884 It has long been the case on PlayStation that the linker itself has taken on much of the responsibility that is traditionally the domain of the C language driver elsewhere: which linker script to use, se

[clang] [PS4/PS5][NFC] Split PScpu::Linker into PS4/PS5 classes (PR #98884)

2024-07-15 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] [PS4/PS5][NFC] Split PScpu::Linker into PS4/PS5 classes (PR #98884)

2024-07-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Edd Dawson (playstation-edd) Changes It has long been the case on PlayStation that the linker itself has taken on much of the responsibility that is traditionally the domain of the C language driver elsewhere: which linker script to use,

[clang] [PS4/PS5][NFC] Split PScpu::Linker into PS4/PS5 classes (PR #98884)

2024-07-15 Thread Edd Dawson via cfe-commits
playstation-edd wrote: > If you wish to, you can add reviewers by using the "Reviewers" section on > this page. > > If this is not working for you, it is probably because you do not have write > permissions for the repository. In which case you can instead tag reviewers > by name in a comment

[clang] [AArch64][RISCV] Document option --print-supported-extensions (PR #98698)

2024-07-15 Thread Tomas Matheson via cfe-commits
https://github.com/tmatheson-arm approved this pull request. https://github.com/llvm/llvm-project/pull/98698 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [SystemZ][z/OS] Implement z/OS XPLINK ABI (PR #91384)

2024-07-15 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand edited https://github.com/llvm/llvm-project/pull/91384 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [SystemZ][z/OS] Implement z/OS XPLINK ABI (PR #91384)

2024-07-15 Thread Ulrich Weigand via cfe-commits
@@ -529,9 +530,355 @@ bool SystemZTargetCodeGenInfo::isVectorTypeBased(const Type *Ty, return false; } +//===--===// +// z/OS XPLINK ABI Implementation +//===

[clang] [SystemZ][z/OS] Implement z/OS XPLINK ABI (PR #91384)

2024-07-15 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand commented: This version looks mostly good to me - just a few remaining questions inline. Thanks! https://github.com/llvm/llvm-project/pull/91384 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[clang] [SystemZ][z/OS] Implement z/OS XPLINK ABI (PR #91384)

2024-07-15 Thread Ulrich Weigand via cfe-commits
@@ -529,9 +530,355 @@ bool SystemZTargetCodeGenInfo::isVectorTypeBased(const Type *Ty, return false; } +//===--===// +// z/OS XPLINK ABI Implementation +//===

[clang] [SystemZ][z/OS] Implement z/OS XPLINK ABI (PR #91384)

2024-07-15 Thread Ulrich Weigand via cfe-commits
@@ -529,9 +530,355 @@ bool SystemZTargetCodeGenInfo::isVectorTypeBased(const Type *Ty, return false; } +//===--===// +// z/OS XPLINK ABI Implementation +//===

[clang] [libcxx] [llvm] Reapply "[Clang] Implement resolution for CWG1835 (#92957)" (PR #98547)

2024-07-15 Thread Haojian Wu via cfe-commits
hokein wrote: @sdkrystian, I think we need to temporarily revert your patch (and sorry for that), as there is no way to fully preserve the old behavior of clang (our integration has been blocking since last week, and I think other large projects may encounter this issue as well): - The `-Wno-

[clang] [PAC] Implement function pointer re-signing (PR #98847)

2024-07-15 Thread Anatoly Trosinenko via cfe-commits
@@ -165,6 +166,88 @@ CGPointerAuthInfo CodeGenModule::getPointerAuthInfoForType(QualType T) { return ::getPointerAuthInfoForType(*this, T); } +static bool isZeroConstant(llvm::Value *value) { + if (auto ci = dyn_cast(value)) +return ci->isZero(); + return false; +} +

[clang] [PAC] Implement function pointer re-signing (PR #98847)

2024-07-15 Thread Anatoly Trosinenko via cfe-commits
@@ -165,6 +166,88 @@ CGPointerAuthInfo CodeGenModule::getPointerAuthInfoForType(QualType T) { return ::getPointerAuthInfoForType(*this, T); } +static bool isZeroConstant(llvm::Value *value) { atrosinenko wrote: The existing code in `CGPointerAuth.cpp` seem

[clang] [PAC] Implement function pointer re-signing (PR #98847)

2024-07-15 Thread Anatoly Trosinenko via cfe-commits
@@ -192,14 +215,18 @@ class Address { /// Return the IR name of the pointer value. llvm::StringRef getName() const { return Pointer.getPointer()->getName(); } + const CGPointerAuthInfo &getPointerAuthInfo() const { return PtrAuthInfo; } + void setPointerAuthInfo(const CG

[clang] 6484655 - [clang][Interp] Allow initialization of extern variables via ctors

2024-07-15 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-07-15T13:12:52+02:00 New Revision: 6484655f9dd07c6d5669dd540feef3c80af84827 URL: https://github.com/llvm/llvm-project/commit/6484655f9dd07c6d5669dd540feef3c80af84827 DIFF: https://github.com/llvm/llvm-project/commit/6484655f9dd07c6d5669dd540feef3c80af84827.diff LO

[clang] [libcxx] [llvm] Reapply "[Clang] Implement resolution for CWG1835 (#92957)" (PR #98547)

2024-07-15 Thread Luke Lau via cfe-commits
lukel97 wrote: I'm also seeing a error when building the 510.parest_r benchmark from SPEC CPU 2017 https://github.com/llvm/llvm-project/pull/98547 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] [clang] Emit bad shift warnings (PR #70307)

2024-07-15 Thread Stephan Bergmann via cfe-commits
stbergmann wrote: This started to cause ``` $ cat test.c #include void f(void) { char a[strlen("x")]; (void) a; } ``` ``` $ clang -Wall -fsyntax-only test.c test.c:3:12: warning: variable length array folded to constant array as an extension [-Wgnu-folding-constant] 3 | char a[s

[clang] [libcxx] [llvm] Reapply "[Clang] Implement resolution for CWG1835 (#92957)" (PR #98547)

2024-07-15 Thread via cfe-commits
cor3ntin wrote: @opensdd You might want to know that CWG1835 is causing some disruption in the wild I wonder if we should consider deploying that change *NOT* as a DR such that it would only affect C++23+ conformance, that might alleviate some of the pain points. https://github.com/llvm/llvm-

[clang] 0bfdc4d - Add __builtin_fmaf16. (#97424)

2024-07-15 Thread via cfe-commits
Author: Zahira Ammarguellat Date: 2024-07-15T08:29:16-04:00 New Revision: 0bfdc4d49285edca17a364a8d58cd60d5757c128 URL: https://github.com/llvm/llvm-project/commit/0bfdc4d49285edca17a364a8d58cd60d5757c128 DIFF: https://github.com/llvm/llvm-project/commit/0bfdc4d49285edca17a364a8d58cd60d5757c128

[clang] Add __builtin_fmaf16. (PR #97424)

2024-07-15 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam closed https://github.com/llvm/llvm-project/pull/97424 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISC-V] Remove experimental for Zicfiss/Zicfilp. (PR #98891)

2024-07-15 Thread Yeting Kuo via cfe-commits
https://github.com/yetingk created https://github.com/llvm/llvm-project/pull/98891 Both of them are ratified. https://wiki.riscv.org/display/HOME/Ratified+Extensions >From fe7a971ae7c7dd7436bc39506bf660f49b37c974 Mon Sep 17 00:00:00 2001 From: Yeting Kuo Date: Mon, 15 Jul 2024 00:51:19 -0700 S

[clang] [llvm] [RISC-V] Remove experimental for Zicfiss/Zicfilp. (PR #98891)

2024-07-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver @llvm/pr-subscribers-backend-risc-v Author: Yeting Kuo (yetingk) Changes Both of them are ratified. https://wiki.riscv.org/display/HOME/Ratified+Extensions --- Patch is 23.56 KiB, truncated to 20.00 KiB below, full version: https://github

[clang] [llvm] [RISC-V] Remove experimental for Zicfiss/Zicfilp. (PR #98891)

2024-07-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Yeting Kuo (yetingk) Changes Both of them are ratified. https://wiki.riscv.org/display/HOME/Ratified+Extensions --- Patch is 23.56 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/98891.diff 18

[clang] [llvm] [RISC-V] Remove experimental for Zicfiss/Zicfilp. (PR #98891)

2024-07-15 Thread Yeting Kuo via cfe-commits
@@ -5,5 +5,5 @@ ## Version strings are required for experimental extensions -.attribute arch, "rv32izicfilp" -# CHECK: error: invalid arch name 'rv32izicfilp', experimental extension requires explicit version number `zicfilp` +.attribute arch, "rv32izalasr"

[clang] [llvm] [RISC-V] Remove experimental for Zicfiss/Zicfilp. (PR #98891)

2024-07-15 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 9d34b673c0abea4ee0a3dd4c399314411b02f1cc fe7a971ae7c7dd7436bc39506bf660f49b37c974 --e

[clang] [clang-format] Add BinPackBinaryOperations configuration (PR #95013)

2024-07-15 Thread Ameer J via cfe-commits
https://github.com/ameerj updated https://github.com/llvm/llvm-project/pull/95013 >From a50f3d4395efd09eea8ba2e750bb785857f9a550 Mon Sep 17 00:00:00 2001 From: ameerj Date: Mon, 10 Jun 2024 12:09:40 -0400 Subject: [PATCH 01/14] Add BinPackBinaryOperations --- clang/include/clang/Format/Format

[clang] [clang-format] Add BinPackBinaryOperations configuration (PR #95013)

2024-07-15 Thread Ameer J via cfe-commits
@@ -27628,6 +27628,119 @@ TEST_F(FormatTest, SpaceBetweenKeywordAndLiteral) { verifyFormat("return sizeof \"5\";"); } +TEST_F(FormatTest, BinPackBinaryOperations) { + auto Style = getLLVMStyleWithColumns(60); + // Logical operations + verifyFormat("if (condition1 && condi

[clang] [clang] Emit bad shift warnings (PR #70307)

2024-07-15 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > This started to cause > > ``` > $ cat test.c > #include > void f(void) { > char a[strlen("x")]; > (void) a; > } > ``` > > ``` > $ clang -Wall -fsyntax-only test.c > test.c:3:12: warning: variable length array folded to constant array as an > extension [-Wgnu-fold

[clang] Remove FiniteMathOnly and use only NoHonorINFs and NoHonorNANs. (PR #97342)

2024-07-15 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/97342 >From aea6519809340024226d587303e26c800c1a3756 Mon Sep 17 00:00:00 2001 From: Zahira Ammarguellat Date: Mon, 1 Jul 2024 12:56:07 -0700 Subject: [PATCH 1/6] [NFC] Add assertion to ensure that FiniteMathOnly toggl

[clang] [llvm] [SystemZ][z/OS] Update autoconversion functions to improve support for UTF-8 (PR #98652)

2024-07-15 Thread Abhina Sree via cfe-commits
@@ -326,7 +326,7 @@ ErrorOr> RealFileSystem::openFileForRead(const Twine &Name) { SmallString<256> RealName, Storage; Expected FDOrErr = sys::fs::openNativeFileForRead( - adjustPath(Name, Storage), sys::fs::OF_None, &RealName); + adjustPath(Name, Storage), sys::fs

[clang] [clang] Emit bad shift warnings (PR #70307)

2024-07-15 Thread Stephan Bergmann via cfe-commits
stbergmann wrote: > That is intentional; `strlen` is not a valid constant expression in C, and so > that is technically a VLA, except we have an extension to fold it back into a > constant. Thanks for confirming. From the commit message and the changes to `clang/docs/ReleaseNotes.rst` it jus

[clang] 1af3a89 - Correct test for 32-bit systems

2024-07-15 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2024-07-15T09:03:30-04:00 New Revision: 1af3a89a4b384cbc5a6b111a0f7756085de818cd URL: https://github.com/llvm/llvm-project/commit/1af3a89a4b384cbc5a6b111a0f7756085de818cd DIFF: https://github.com/llvm/llvm-project/commit/1af3a89a4b384cbc5a6b111a0f7756085de818cd.diff

[clang] [C2y] Claim partial conformance to WG14 N3244 (PR #98525)

2024-07-15 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: Thank you for letting me know, I've pushed a fix for that. Curiously, it seems `_Alignof` on an expression always returns the *preferred* alignment and not the actual alignment. This is consistent with GCC, even if it's a bit surprising: https://godbolt.org/z/nvKx98ff9 htt

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed, fixed (PR #98795)

2024-07-15 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > @AaronBallman could you please review? > > I've fixed at least the LLDB tests. There was an actual bug in function > parameters construction that was revealed by the invariant check. > > However, I can't run the whole LLDB suite. Even among the reported failing > tests,

[clang] [llvm] AMDGPU: Move attributor into optimization pipeline (PR #83131)

2024-07-15 Thread Jan Patrick Lehr via cfe-commits
jplehr wrote: Hey @arsenm this broke all AMDGPU OpenMP Offload buildbots (e.g., https://lab.llvm.org/buildbot/#/builders/30). Any chance you can fix these issues? https://github.com/llvm/llvm-project/pull/83131 ___ cfe-commits mailing list cfe-commit

[clang] Fix a regression with alignas on structure members in C (PR #98642)

2024-07-15 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > I'm not sure I understand what happened here, since `_Alignas` did work > properly before this change, right? How/why are `_Alignas` and `alignas` > acting differently from eachother in C23 mode? `_Alignas` on a field used to work properly before b9cf7f1066cc7ec11c6074d1

[clang] [llvm] AMDGPU: Move attributor into optimization pipeline (PR #83131)

2024-07-15 Thread Matt Arsenault via cfe-commits
arsenm wrote: > Hey @arsenm this broke all AMDGPU OpenMP Offload buildbots (e.g., > https://lab.llvm.org/buildbot/#/builders/30). > > Any chance you can fix these issues? Can you attach before/after IR and just XFAIL them for now? https://github.com/llvm/llvm-project/pull/83131 __

[clang] [llvm] [mlir] Remove the `x86_mmx` IR type. (PR #98505)

2024-07-15 Thread James Y Knight via cfe-commits
@@ -1,9 +0,0 @@ -; RUN: llvm-as < %s | llvm-dis | FileCheck %s -; RUN: verify-uselistorder %s -; Basic smoke test for x86_mmx type. - -; CHECK: define x86_mmx @sh16 jyknight wrote: The compatibility* tests already cover bitcode-upgrade, and now the IR text "x86_

[clang] reland (PR #98896)

2024-07-15 Thread via cfe-commits
https://github.com/martinboehme created https://github.com/llvm/llvm-project/pull/98896 - **Reapply "[clang][dataflow] Teach `AnalysisASTVisitor` that `typeid()` can be evaluated." (#96766)** - **Turn on RTTI explicitly in `checkDataflowWithNoopAnalysis()`.** >From b7dbf7d24e536c22c2a380d7b6d

[clang] [llvm] [mlir] Remove the `x86_mmx` IR type. (PR #98505)

2024-07-15 Thread James Y Knight via cfe-commits
@@ -57594,6 +57599,86 @@ static SDValue combinePDEP(SDNode *N, SelectionDAG &DAG, return SDValue(); } +// Fixup the MMX intrinsics' types: in IR they are expressed with <1 x i64>, jyknight wrote: We perhaps _could_ use i64, but i64 is also not a legal type

[clang] reland (PR #98896)

2024-07-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-analysis Author: None (martinboehme) Changes - **Reapply "[clang][dataflow] Teach `AnalysisASTVisitor` that `typeid()` can be evaluated." (#96766)** - **Turn on RTTI explicitly in `checkDataflowWithNoopAnalysis()`.** -

[clang] Retrieve BinaryOperator::getOpcode and BinaryOperator::getOpcodeStr via libclang and its python interface (PR #98489)

2024-07-15 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/98489 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] reland (PR #98896)

2024-07-15 Thread via cfe-commits
martinboehme wrote: Per discussion with @sam-mccall, the issue that was causing the buildbot failure when I originally landed #98896 is that RTTI is turned off by default on Playstation targets. To resolve this, I'm now turning on `-frtti` explicitly. https://github.com/llvm/llvm-project/pull/

[clang] Retrieve BinaryOperator::getOpcode and BinaryOperator::getOpcodeStr via libclang and its python interface (PR #98489)

2024-07-15 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman closed https://github.com/llvm/llvm-project/pull/98489 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Retrieve BinaryOperator::getOpcode and BinaryOperator::getOpcodeStr via libclang and its python interface (PR #98489)

2024-07-15 Thread via cfe-commits
github-actions[bot] wrote: @thomaswucher 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 b

[clang] [clang][OpenMP] Remove compound directives from `checkNestingOfRegions` (PR #98387)

2024-07-15 Thread Krzysztof Parzyszek via cfe-commits
https://github.com/kparzysz closed https://github.com/llvm/llvm-project/pull/98387 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][OpenMP] Update validity check for reduction with `inscan` (PR #98500)

2024-07-15 Thread Krzysztof Parzyszek via cfe-commits
https://github.com/kparzysz edited https://github.com/llvm/llvm-project/pull/98500 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 861a8ed - [clang][OpenMP] Remove compound directives from `checkNestingOfRegions` (#98387)

2024-07-15 Thread via cfe-commits
Author: Krzysztof Parzyszek Date: 2024-07-15T08:20:18-05:00 New Revision: 861a8ed68be7c6d5e2605b1ab3810fde72b5f66a URL: https://github.com/llvm/llvm-project/commit/861a8ed68be7c6d5e2605b1ab3810fde72b5f66a DIFF: https://github.com/llvm/llvm-project/commit/861a8ed68be7c6d5e2605b1ab3810fde72b5f66a

[clang] [llvm] [RISC-V] Remove experimental for Zicfiss/Zicfilp. (PR #98891)

2024-07-15 Thread Kito Cheng via cfe-commits
kito-cheng wrote: `llvm/docs/RISCVUsage.rst` and `llvm/docs/ReleaseNotes.rst` need update :) https://github.com/llvm/llvm-project/pull/98891 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[clang] reland (PR #98896)

2024-07-15 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/98896 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV][FMV] Support target_clones (PR #85786)

2024-07-15 Thread Piyou Chen via cfe-commits
BeMg wrote: This patch support the `target_clones` function attribute and function multiversioning feature for RISC-V target. It will generate the ifunc resolver function for the function that declared with target_clones attribute. The resolver function will check the version support by runti

[clang] bd04ac0 - Fix "default label in switch which covers all enumeration values" warning; NFC

2024-07-15 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2024-07-15T09:31:14-04:00 New Revision: bd04ac0694cc9fb3c43a4acb2f7cd1db08eba673 URL: https://github.com/llvm/llvm-project/commit/bd04ac0694cc9fb3c43a4acb2f7cd1db08eba673 DIFF: https://github.com/llvm/llvm-project/commit/bd04ac0694cc9fb3c43a4acb2f7cd1db08eba673.diff

[clang] [clang][OpenMP] Update validity check for reduction with `inscan` (PR #98500)

2024-07-15 Thread Krzysztof Parzyszek via cfe-commits
https://github.com/kparzysz updated https://github.com/llvm/llvm-project/pull/98500 >From bc7e6962de9e1e44773eee89d0f552342b40 Mon Sep 17 00:00:00 2001 From: Krzysztof Parzyszek Date: Wed, 10 Jul 2024 14:38:57 -0500 Subject: [PATCH 1/4] [clang][OpenMP] Fix region nesting check for `scan` d

[clang] Fix a regression with alignas on structure members in C (PR #98642)

2024-07-15 Thread James Y Knight via cfe-commits
jyknight wrote: The part I'm confused about is that this commit doesn't appear to simply be adding "or `alignas`" to some code that said "if `_Alignas`". Yes, the newly added `isAlignas()` checks do cover both attributes, but `_Alignas` was still working even after b9cf7f1. That is, in clang

[clang] [C2y] Claim partial conformance to WG14 N3244 (PR #98525)

2024-07-15 Thread Michał Górny via cfe-commits
mgorny wrote: Thanks. I can confirm that the tests pass for me with the patch applied. https://github.com/llvm/llvm-project/pull/98525 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PAC] Implement function pointer re-signing (PR #98847)

2024-07-15 Thread Daniil Kovalev via cfe-commits
@@ -165,6 +166,88 @@ CGPointerAuthInfo CodeGenModule::getPointerAuthInfoForType(QualType T) { return ::getPointerAuthInfoForType(*this, T); } +static bool isZeroConstant(llvm::Value *value) { + if (auto ci = dyn_cast(value)) +return ci->isZero(); + return false; +} +

[clang] [PAC] Implement function pointer re-signing (PR #98847)

2024-07-15 Thread Daniil Kovalev via cfe-commits
@@ -195,34 +195,45 @@ CodeGenFunction::CGFPOptionsRAII::~CGFPOptionsRAII() { CGF.Builder.setDefaultConstrainedRounding(OldRounding); } -static LValue MakeNaturalAlignAddrLValue(llvm::Value *V, QualType T, - bool ForPointeeType, -

[clang] [PAC] Implement function pointer re-signing (PR #98847)

2024-07-15 Thread Daniil Kovalev via cfe-commits
@@ -0,0 +1,77 @@ +// RUN: %clang_cc1 -fptrauth-function-pointer-type-discrimination -triple arm64-apple-ios -fptrauth-calls -fptrauth-intrinsics -emit-llvm %s -o - | FileCheck -check-prefix=CHECK -check-prefix=NOPCH %s kovdan01 wrote: Nit: maybe use `-check-pr

[clang] [PAC] Implement function pointer re-signing (PR #98847)

2024-07-15 Thread Daniil Kovalev via cfe-commits
@@ -3126,3 +3137,57 @@ CodeGenFunction::EmitPointerAuthAuth(const CGPointerAuthInfo &PointerAuth, return EmitPointerAuthCommon(*this, PointerAuth, Pointer, llvm::Intrinsic::ptrauth_auth); } + +llvm::Value *CodeGenFunction::EmitPointerAuthSign(Q

[clang] [PAC] Implement function pointer re-signing (PR #98847)

2024-07-15 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 commented: I've left a bunch of mostly cosmetic comments and minor nits which are non-blocking in terms of merging that. However, I'll take another look at this "with fresh eyes" within a day - I need a bit more time to drill into actual logic. https://github.com/l

[clang] [PAC] Implement function pointer re-signing (PR #98847)

2024-07-15 Thread Daniil Kovalev via cfe-commits
@@ -3126,3 +3137,57 @@ CodeGenFunction::EmitPointerAuthAuth(const CGPointerAuthInfo &PointerAuth, return EmitPointerAuthCommon(*this, PointerAuth, Pointer, llvm::Intrinsic::ptrauth_auth); } + +llvm::Value *CodeGenFunction::EmitPointerAuthSign(Q

[clang] [PAC] Implement function pointer re-signing (PR #98847)

2024-07-15 Thread Daniil Kovalev via cfe-commits
@@ -165,6 +166,88 @@ CGPointerAuthInfo CodeGenModule::getPointerAuthInfoForType(QualType T) { return ::getPointerAuthInfoForType(*this, T); } +static bool isZeroConstant(llvm::Value *value) { + if (auto ci = dyn_cast(value)) +return ci->isZero(); + return false; +} +

[clang] [PAC] Implement function pointer re-signing (PR #98847)

2024-07-15 Thread Daniil Kovalev via cfe-commits
@@ -3126,3 +3137,57 @@ CodeGenFunction::EmitPointerAuthAuth(const CGPointerAuthInfo &PointerAuth, return EmitPointerAuthCommon(*this, PointerAuth, Pointer, llvm::Intrinsic::ptrauth_auth); } + +llvm::Value *CodeGenFunction::EmitPointerAuthSign(Q

[clang] [PAC] Implement function pointer re-signing (PR #98847)

2024-07-15 Thread Daniil Kovalev via cfe-commits
@@ -0,0 +1,55 @@ +// RUN: %clang_cc1 %s -triple arm64e-apple-ios13 -fptrauth-calls -fptrauth-intrinsics -emit-llvm -o- -fptrauth-function-pointer-type-discrimination | FileCheck %s + +typedef void (*fptr_t)(void); + +char *cptr; +void (*fptr)(void); + +// CHECK-LABEL: define vo

[clang] [PAC] Implement function pointer re-signing (PR #98847)

2024-07-15 Thread Daniil Kovalev via cfe-commits
@@ -351,3 +434,125 @@ CodeGenModule::getVTablePointerAuthInfo(CodeGenFunction *CGF, /* IsIsaPointer */ false, /* AuthenticatesNullValues */ false, Discriminator); } + +llvm::Value *CodeGenFunction::AuthPointerToPointerCast(

[clang] [PAC] Implement function pointer re-signing (PR #98847)

2024-07-15 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 edited https://github.com/llvm/llvm-project/pull/98847 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PAC] Implement function pointer re-signing (PR #98847)

2024-07-15 Thread Daniil Kovalev via cfe-commits
@@ -3126,3 +3137,57 @@ CodeGenFunction::EmitPointerAuthAuth(const CGPointerAuthInfo &PointerAuth, return EmitPointerAuthCommon(*this, PointerAuth, Pointer, llvm::Intrinsic::ptrauth_auth); } + +llvm::Value *CodeGenFunction::EmitPointerAuthSign(Q

[clang] [PAC] Implement function pointer re-signing (PR #98847)

2024-07-15 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: Could you please clarify what tests should go to ptrauth.c? The test name is very generic, and we have more than 10 tests with clang/test/CodeGen/ptrauth*.c names. Maybe this should be renamed to smth more specific? https://github.com/llvm/llv

[clang] [PAC] Implement function pointer re-signing (PR #98847)

2024-07-15 Thread Daniil Kovalev via cfe-commits
@@ -190,8 +190,8 @@ class CGBuilderTy : public CGBuilderBaseTy { const llvm::Twine &Name = "") { if (!Addr.hasOffset()) return Address(CreateAddrSpaceCast(Addr.getBasePointer(), Ty, Name), - ElementTy, Addr.getAlignmen

[clang] [PAC] Implement function pointer re-signing (PR #98847)

2024-07-15 Thread Daniil Kovalev via cfe-commits
@@ -165,6 +166,88 @@ CGPointerAuthInfo CodeGenModule::getPointerAuthInfoForType(QualType T) { return ::getPointerAuthInfoForType(*this, T); } +static bool isZeroConstant(llvm::Value *value) { + if (auto ci = dyn_cast(value)) +return ci->isZero(); + return false; +} +

[clang] [PAC] Implement function pointer re-signing (PR #98847)

2024-07-15 Thread Daniil Kovalev via cfe-commits
@@ -165,6 +166,88 @@ CGPointerAuthInfo CodeGenModule::getPointerAuthInfoForType(QualType T) { return ::getPointerAuthInfoForType(*this, T); } +static bool isZeroConstant(llvm::Value *value) { + if (auto ci = dyn_cast(value)) +return ci->isZero(); + return false; +} +

[clang] [PAC] Implement function pointer re-signing (PR #98847)

2024-07-15 Thread Daniil Kovalev via cfe-commits
@@ -0,0 +1,55 @@ +// RUN: %clang_cc1 %s -triple arm64e-apple-ios13 -fptrauth-calls -fptrauth-intrinsics -emit-llvm -o- -fptrauth-function-pointer-type-discrimination | FileCheck %s kovdan01 wrote: Nit: it would also be nice to have RUN lines against linux trip

[clang] [PAC] Implement function pointer re-signing (PR #98847)

2024-07-15 Thread Daniil Kovalev via cfe-commits
@@ -0,0 +1,77 @@ +// RUN: %clang_cc1 -fptrauth-function-pointer-type-discrimination -triple arm64-apple-ios -fptrauth-calls -fptrauth-intrinsics -emit-llvm %s -o - | FileCheck -check-prefix=CHECK -check-prefix=NOPCH %s +// RUN: %clang_cc1 -fptrauth-function-pointer-type-discrim

[clang] [PAC] Implement function pointer re-signing (PR #98847)

2024-07-15 Thread Daniil Kovalev via cfe-commits
@@ -0,0 +1,77 @@ +// RUN: %clang_cc1 -fptrauth-function-pointer-type-discrimination -triple arm64-apple-ios -fptrauth-calls -fptrauth-intrinsics -emit-llvm %s -o - | FileCheck -check-prefix=CHECK -check-prefix=NOPCH %s kovdan01 wrote: Nit: long RUN lines shoul

[clang] [PAC] Implement function pointer re-signing (PR #98847)

2024-07-15 Thread Daniil Kovalev via cfe-commits
@@ -165,6 +166,88 @@ CGPointerAuthInfo CodeGenModule::getPointerAuthInfoForType(QualType T) { return ::getPointerAuthInfoForType(*this, T); } +static bool isZeroConstant(llvm::Value *value) { + if (auto ci = dyn_cast(value)) +return ci->isZero(); + return false; +} +

[clang] [PAC] Implement function pointer re-signing (PR #98847)

2024-07-15 Thread Daniil Kovalev via cfe-commits
@@ -165,6 +166,88 @@ CGPointerAuthInfo CodeGenModule::getPointerAuthInfoForType(QualType T) { return ::getPointerAuthInfoForType(*this, T); } +static bool isZeroConstant(llvm::Value *value) { + if (auto ci = dyn_cast(value)) kovdan01 wrote: Nit ```suggest

[clang] [PAC] Implement function pointer re-signing (PR #98847)

2024-07-15 Thread Daniil Kovalev via cfe-commits
@@ -3126,3 +3137,57 @@ CodeGenFunction::EmitPointerAuthAuth(const CGPointerAuthInfo &PointerAuth, return EmitPointerAuthCommon(*this, PointerAuth, Pointer, llvm::Intrinsic::ptrauth_auth); } + +llvm::Value *CodeGenFunction::EmitPointerAuthSign(Q

[clang] [PAC] Implement function pointer re-signing (PR #98847)

2024-07-15 Thread Daniil Kovalev via cfe-commits
@@ -165,6 +166,88 @@ CGPointerAuthInfo CodeGenModule::getPointerAuthInfoForType(QualType T) { return ::getPointerAuthInfoForType(*this, T); } +static bool isZeroConstant(llvm::Value *value) { + if (auto ci = dyn_cast(value)) +return ci->isZero(); + return false; +} +

[clang] [PAC] Implement function pointer re-signing (PR #98847)

2024-07-15 Thread Daniil Kovalev via cfe-commits
@@ -3126,3 +3137,57 @@ CodeGenFunction::EmitPointerAuthAuth(const CGPointerAuthInfo &PointerAuth, return EmitPointerAuthCommon(*this, PointerAuth, Pointer, llvm::Intrinsic::ptrauth_auth); } + +llvm::Value *CodeGenFunction::EmitPointerAuthSign(Q

[clang] [clang][OpenMP] Simplify check for taskloop in `ActOnOpenMPLoopInitia… (PR #98633)

2024-07-15 Thread Krzysztof Parzyszek via cfe-commits
https://github.com/kparzysz edited https://github.com/llvm/llvm-project/pull/98633 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] a1dfe15 - [clang][OpenMP] Simplify check for taskloop in `ActOnOpenMPLoopInitia… (#98633)

2024-07-15 Thread via cfe-commits
Author: Krzysztof Parzyszek Date: 2024-07-15T08:53:14-05:00 New Revision: a1dfe15632170342ae073d7238294dfe224682ed URL: https://github.com/llvm/llvm-project/commit/a1dfe15632170342ae073d7238294dfe224682ed DIFF: https://github.com/llvm/llvm-project/commit/a1dfe15632170342ae073d7238294dfe224682ed

[clang] [clang][OpenMP] Simplify check for taskloop in `ActOnOpenMPLoopInitia… (PR #98633)

2024-07-15 Thread Krzysztof Parzyszek via cfe-commits
https://github.com/kparzysz closed https://github.com/llvm/llvm-project/pull/98633 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 97ebc97 - [clang[OpenMP] Revert accidentally included changes from previous commit

2024-07-15 Thread Krzysztof Parzyszek via cfe-commits
Author: Krzysztof Parzyszek Date: 2024-07-15T09:10:11-05:00 New Revision: 97ebc9794941d9e73792ab9deab7abafaf750a17 URL: https://github.com/llvm/llvm-project/commit/97ebc9794941d9e73792ab9deab7abafaf750a17 DIFF: https://github.com/llvm/llvm-project/commit/97ebc9794941d9e73792ab9deab7abafaf750a17

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-07-15 Thread Arthur Laurent via cfe-commits
Arthapz wrote: > Given we are going to branch clang19 in the end of the month, it is highly > possible that we can't land sufficient patches before that. Note that even if > we land this patch before that, the support of modules in clangd is expected > to very slow for real world applications.

[clang] [clang][OpenMP] Update validity check for reduction with `inscan` (PR #98500)

2024-07-15 Thread Krzysztof Parzyszek via cfe-commits
https://github.com/kparzysz updated https://github.com/llvm/llvm-project/pull/98500 >From bc7e6962de9e1e44773eee89d0f552342b40 Mon Sep 17 00:00:00 2001 From: Krzysztof Parzyszek Date: Wed, 10 Jul 2024 14:38:57 -0500 Subject: [PATCH 1/4] [clang][OpenMP] Fix region nesting check for `scan` d

[clang] [libcxx] [llvm] Reapply "[Clang] Implement resolution for CWG1835 (#92957)" (PR #98547)

2024-07-15 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: > @opensdd You might want to know that CWG1835 is causing some disruption in > the wild > > I wonder if we should consider deploying that change _NOT_ as a DR such that > it would only affect C++23+ conformance, that might alleviate some of the > pain points. *@opensdh htt

[clang] [llvm] [mlir] Remove the `x86_mmx` IR type. (PR #98505)

2024-07-15 Thread Simon Pilgrim via cfe-commits
@@ -57594,6 +57599,86 @@ static SDValue combinePDEP(SDNode *N, SelectionDAG &DAG, return SDValue(); } +// Fixup the MMX intrinsics' types: in IR they are expressed with <1 x i64>, RKSimon wrote: <1 x i64> makes more sense to me to avoid i64 legalization is

[clang] [llvm] [mlir] Remove the `x86_mmx` IR type. (PR #98505)

2024-07-15 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon edited https://github.com/llvm/llvm-project/pull/98505 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [C23] Fix typeof_unqual for qualified array types (PR #92767)

2024-07-15 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > @AaronBallman was there anything else that needed to be done? Just did a > merge because ReleaseNotes was edited but this should be fine Nope, this is approved to land. https://github.com/llvm/llvm-project/pull/92767 ___ cfe-com

[clang] [llvm] [mlir] Remove the `x86_mmx` IR type. (PR #98505)

2024-07-15 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon deleted https://github.com/llvm/llvm-project/pull/98505 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] Extend diagnose_if to accept more detailed warning information (PR #70976)

2024-07-15 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,45 @@ +// RUN: %clang_cc1 %s -verify -fno-builtin -Werror=comment -Wno-error=abi -Wfatal-errors=assume -Wno-fatal-errors=assume + +#define diagnose_if(...) __attribute__((diagnose_if(__VA_ARGS__))) + +template +void diagnose_if_wcomma() diagnose_if(b, "oh no", "warnin

[clang] [AArch64][RISCV] Document option --print-supported-extensions (PR #98698)

2024-07-15 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. https://github.com/llvm/llvm-project/pull/98698 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Remove FiniteMathOnly and use only NoHonorINFs and NoHonorNANs. (PR #97342)

2024-07-15 Thread Aaron Ballman via cfe-commits
@@ -34,8 +34,8 @@ void LangOptions::resetNonModularOptions() { // invocations that cannot be round-tripped to arguments. // FIXME: we should derive this automatically from ImpliedBy in tablegen. AllowFPReassoc = UnsafeFPMath; - NoHonorNaNs = FiniteMathOnly; - NoHonorInf

<    1   2   3   4   5   >