[clang] [clang] Support -Wa, options -mmsa and -mno-msa (PR #99615)

2024-07-31 Thread via cfe-commits
yingopq wrote: > I have a try of your patch > > ``` > $ ./bin/clang --target=mips-linux-gnu -mfp64 -Wa,-mmsa nn.c > error: unknown argument: '-mmsa' > ``` > > Oh, `-no-integrated-as` works with your patch. > > ``` > mipsel-linux-gnu-gcc-14 -mfp64 -Wa,-mmsa nn.c > ``` > > has no such problem.

[clang] [clang] Support -Wa, options -mmsa and -mno-msa (PR #99615)

2024-07-31 Thread via cfe-commits
https://github.com/yingopq updated https://github.com/llvm/llvm-project/pull/99615 >From 881ada57bfeb0d0433aa84bb93689f7c06338a19 Mon Sep 17 00:00:00 2001 From: Ying Huang Date: Fri, 19 Jul 2024 04:19:09 -0400 Subject: [PATCH] [clang] Support -Wa, options -mmsa and -mno-msa --- clang/include/

[clang] [compiler-rt] [llvm] [X86][AVX10.2] Support AVX10.2 option and VMPSADBW/VADDP[D,H,S] new instructions (PR #101452)

2024-07-31 Thread Shengchen Kan via cfe-commits
@@ -1219,6 +1219,9 @@ static int getInstructionID(struct InternalInstruction *insn, attrMask |= ATTR_EVEXKZ; if (bFromEVEX4of4(insn->vectorExtensionPrefix[3])) attrMask |= ATTR_EVEXB; + if (x2FromEVEX3of4(insn->vectorExtensionPrefix[2]) && --

[clang] [compiler-rt] [llvm] [X86][AVX10.2] Support AVX10.2 option and VMPSADBW/VADDP[D,H,S] new instructions (PR #101452)

2024-07-31 Thread Shengchen Kan via cfe-commits
@@ -575,6 +575,31 @@ static inline bool inheritsFrom(InstructionContext child, case IC_EVEX_W_NF: case IC_EVEX_W_B_NF: return false; + case IC_EVEX_B_U: + case IC_EVEX_XS_B_U: + case IC_EVEX_XD_B_U: + case IC_EVEX_OPSIZE_B_U: + case IC_EVEX_W_B_U: + case IC_EVEX_W

[clang] [C++20] [Modules] Always emit the inline builtins (PR #101278)

2024-07-31 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 closed https://github.com/llvm/llvm-project/pull/101278 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e167f75 - [C++20] [Modules] Always emit the inline builtins (#101278)

2024-07-31 Thread via cfe-commits
Author: Chuanqi Xu Date: 2024-08-01T14:45:21+08:00 New Revision: e167f753bd4679329ebcf0232f72be9c63d9b671 URL: https://github.com/llvm/llvm-project/commit/e167f753bd4679329ebcf0232f72be9c63d9b671 DIFF: https://github.com/llvm/llvm-project/commit/e167f753bd4679329ebcf0232f72be9c63d9b671.diff LO

[clang] [compiler-rt] [llvm] [X86][AVX10.2] Support AVX10.2 option and VMPSADBW/VADDP[D,H,S] new instructions (PR #101452)

2024-07-31 Thread Shengchen Kan via cfe-commits
@@ -1219,6 +1219,9 @@ static int getInstructionID(struct InternalInstruction *insn, attrMask |= ATTR_EVEXKZ; if (bFromEVEX4of4(insn->vectorExtensionPrefix[3])) attrMask |= ATTR_EVEXB; + if (x2FromEVEX3of4(insn->vectorExtensionPrefix[2]) && +

[clang] [compiler-rt] [llvm] [X86][AVX10.2] Support AVX10.2 option and VMPSADBW/VADDP[D,H,S] new instructions (PR #101452)

2024-07-31 Thread Shengchen Kan via cfe-commits
@@ -111,9 +111,9 @@ class X86OpcodePrefixHelper { // 0b11: F2 // EVEX (4 bytes) - // +-+ +---+ ++ ++ - // | 62h | | RXBR' | B'mmm | | W | | X' | pp | | z | L'L | b | v' | aaa | - // +-+ +---

[clang] [compiler-rt] [llvm] [X86][AVX10.2] Support AVX10.2 option and VMPSADBW/VADDP[D,H,S] new instructions (PR #101452)

2024-07-31 Thread Shengchen Kan via cfe-commits
@@ -111,9 +111,9 @@ class X86OpcodePrefixHelper { // 0b11: F2 // EVEX (4 bytes) - // +-+ +---+ ++ ++ - // | 62h | | RXBR' | B'mmm | | W | | X' | pp | | z | L'L | b | v' | aaa | - // +-+ +---

[clang] [compiler-rt] [llvm] [X86][AVX10.2] Support AVX10.2 option and VMPSADBW/VADDP[D,H,S] new instructions (PR #101452)

2024-07-31 Thread Phoebe Wang via cfe-commits
@@ -575,6 +575,31 @@ static inline bool inheritsFrom(InstructionContext child, case IC_EVEX_W_NF: case IC_EVEX_W_B_NF: return false; + case IC_EVEX_B_U: + case IC_EVEX_XS_B_U: + case IC_EVEX_XD_B_U: + case IC_EVEX_OPSIZE_B_U: + case IC_EVEX_W_B_U: + case IC_EVEX_W

[clang] [Driver] Include crt0.o in the baremetal link (PR #101258)

2024-07-31 Thread Petr Hosek via cfe-commits
@@ -105,6 +109,10 @@ // CHECK-V6M-LIBCXX-USR-SAME: "-lc++" "-lc++abi" "-lunwind" // CHECK-V6M-LIBCXX-USR-SAME: "-lc" "-lm" "{{[^"]*}}libclang_rt.builtins.a" +// RUN: %clangxx --target=arm-none-eabi -nostartfiles -v 2>&1 \ petrhosek wrote: Done. https://githu

[clang] [compiler-rt] [llvm] [X86][AVX10.2] Support AVX10.2 option and VMPSADBW/VADDP[D,H,S] new instructions (PR #101452)

2024-07-31 Thread Phoebe Wang via cfe-commits
@@ -926,7 +951,9 @@ void DisassemblerTables::emitContextTable(raw_ostream &o, unsigned &i) const { else o << "IC_VEX"; - if ((index & ATTR_EVEX) && (index & ATTR_EVEXL2)) + if ((index & ATTR_EVEXB) && (index & ATTR_EVEXU)) +; // Ignore ATTR_VEX

[clang] [Driver] Include crt0.o in the baremetal link (PR #101258)

2024-07-31 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek updated https://github.com/llvm/llvm-project/pull/101258 >From 245a552033793bab479c9be805aacf33cfe64493 Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Tue, 30 Jul 2024 15:17:13 -0700 Subject: [PATCH 1/2] [Driver] Include crt0.o in the baremetal link The common bar

[clang] [compiler-rt] [llvm] [X86][AVX10.2] Support AVX10.2 option and VMPSADBW/VADDP[D,H,S] new instructions (PR #101452)

2024-07-31 Thread Phoebe Wang via cfe-commits
@@ -131,7 +131,7 @@ class X86OpcodePrefixHelper { // | RM (VR) | EVEX_X | EVEX_B | modrm.r/m | VR | Dest or Src | // | RM (GPR) | EVEX_B' | EVEX_B | modrm.r/m | GPR | Dest or Src | // | BASE | EVEX_B' | EVEX_B | modrm.r/m | GPR | MA | - //

[clang] [compiler-rt] [llvm] [X86][AVX10.2] Support AVX10.2 option and VMPSADBW/VADDP[D,H,S] new instructions (PR #101452)

2024-07-31 Thread Shengchen Kan via cfe-commits
@@ -575,6 +575,31 @@ static inline bool inheritsFrom(InstructionContext child, case IC_EVEX_W_NF: case IC_EVEX_W_B_NF: return false; + case IC_EVEX_B_U: + case IC_EVEX_XS_B_U: + case IC_EVEX_XD_B_U: + case IC_EVEX_OPSIZE_B_U: + case IC_EVEX_W_B_U: + case IC_EVEX_W

[clang] [compiler-rt] [llvm] [X86][AVX10.2] Support AVX10.2 option and VMPSADBW/VADDP[D,H,S] new instructions (PR #101452)

2024-07-31 Thread Phoebe Wang via cfe-commits
@@ -111,9 +111,9 @@ class X86OpcodePrefixHelper { // 0b11: F2 // EVEX (4 bytes) - // +-+ +---+ ++ ++ - // | 62h | | RXBR' | B'mmm | | W | | X' | pp | | z | L'L | b | v' | aaa | - // +-+ +---

[clang] [compiler-rt] [llvm] [X86][AVX10.2] Support AVX10.2 option and VMPSADBW/VADDP[D,H,S] new instructions (PR #101452)

2024-07-31 Thread Phoebe Wang via cfe-commits
@@ -111,9 +111,9 @@ class X86OpcodePrefixHelper { // 0b11: F2 // EVEX (4 bytes) - // +-+ +---+ ++ ++ - // | 62h | | RXBR' | B'mmm | | W | | X' | pp | | z | L'L | b | v' | aaa | - // +-+ +---

[clang] [compiler-rt] [llvm] [X86][AVX10.2] Support AVX10.2 option and VMPSADBW/VADDP[D,H,S] new instructions (PR #101452)

2024-07-31 Thread Shengchen Kan via cfe-commits
@@ -926,7 +951,9 @@ void DisassemblerTables::emitContextTable(raw_ostream &o, unsigned &i) const { else o << "IC_VEX"; - if ((index & ATTR_EVEX) && (index & ATTR_EVEXL2)) + if ((index & ATTR_EVEXB) && (index & ATTR_EVEXU)) +; // Ignore ATTR_VEX

[clang] [compiler-rt] [llvm] [X86][AVX10.2] Support AVX10.2 option and VMPSADBW/VADDP[D,H,S] new instructions (PR #101452)

2024-07-31 Thread Phoebe Wang via cfe-commits
@@ -257,6 +257,8 @@ X86_FEATURE_COMPAT(USERMSR, "usermsr", 0) X86_FEATURE_COMPAT(AVX10_1, "avx10.1-256", 36) X86_FEATURE_COMPAT(AVX10_1_512, "avx10.1-512", 37) X86_FEATURE (ZU, "zu") +X86_FEATURE_COMPAT(

[clang] [compiler-rt] [llvm] [X86][AVX10.2] Support AVX10.2 option and VMPSADBW/VADDP[D,H,S] new instructions (PR #101452)

2024-07-31 Thread Phoebe Wang via cfe-commits
@@ -0,0 +1,105 @@ +// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-unknown -target-feature +avx10.2-256 -emit-llvm -o - | FileCheck %s + phoebewang wrote: Done. https://github.com/llvm/llvm-project/pull/101452

[clang] [compiler-rt] [llvm] [X86][AVX10.2] Support AVX10.2 option and VMPSADBW/VADDP[D,H,S] new instructions (PR #101452)

2024-07-31 Thread Phoebe Wang via cfe-commits
@@ -0,0 +1,24 @@ +// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-unknown -target-feature +avx10.2-512 -emit-llvm -o - | FileCheck %s + phoebewang wrote: Added i386 test. `-flax-vector-conversions=none` is required. It

[clang] [compiler-rt] [llvm] [X86][AVX10.2] Support AVX10.2 option and VMPSADBW/VADDP[D,H,S] new instructions (PR #101452)

2024-07-31 Thread Phoebe Wang via cfe-commits
@@ -162,6 +162,9 @@ bool SemaX86::CheckBuiltinRoundingOrSAE(unsigned BuiltinID, CallExpr *TheCall) { case X86::BI__builtin_ia32_mulps512: case X86::BI__builtin_ia32_subpd512: case X86::BI__builtin_ia32_subps512: + case X86::BI__builtin_ia32_vaddpd256_round:

[clang] [compiler-rt] [llvm] [X86][AVX10.2] Support AVX10.2 option and VMPSADBW/VADDP[D,H,S] new instructions (PR #101452)

2024-07-31 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 1c5f6cfc352c3bd2a4faa0e3aebb4028b557a5e7 787a1bca8c855e5ee00760e58381979206c83f70 --e

[clang] [compiler-rt] [llvm] [X86][AVX10.2] Support AVX10.2 option and VMPSADBW/VADDP[D,H,S] new instructions (PR #101452)

2024-07-31 Thread Phoebe Wang via cfe-commits
@@ -0,0 +1,83 @@ +/*=== avx10_2niintrin.h - AVX10.2 new instruction intrinsics ---=== + * + * 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: Apach

[clang] [compiler-rt] [llvm] [X86][AVX10.2] Support AVX10.2 option and VMPSADBW/VADDP[D,H,S] new instructions (PR #101452)

2024-07-31 Thread Phoebe Wang via cfe-commits
@@ -1819,7 +1819,7 @@ const StringMap sys::getHostCPUFeatures() { Features["avxvnniint16"] = HasLeaf7Subleaf1 && ((EDX >> 10) & 1) && HasAVXSave; Features["prefetchi"] = HasLeaf7Subleaf1 && ((EDX >> 14) & 1); Features["usermsr"] = HasLeaf7Subleaf1 && ((EDX >> 15) & 1);

[clang] [llvm] [X86][AVX10.2] Support AVX10.2 option and VMPSADBW/VADDP[D,H,S] new instructions (PR #101452)

2024-07-31 Thread Shengchen Kan via cfe-commits
@@ -131,7 +131,7 @@ class X86OpcodePrefixHelper { // | RM (VR) | EVEX_X | EVEX_B | modrm.r/m | VR | Dest or Src | // | RM (GPR) | EVEX_B' | EVEX_B | modrm.r/m | GPR | Dest or Src | // | BASE | EVEX_B' | EVEX_B | modrm.r/m | GPR | MA | - //

[clang] [llvm] [X86][AVX10.2] Support AVX10.2 option and VMPSADBW/VADDP[D,H,S] new instructions (PR #101452)

2024-07-31 Thread Shengchen Kan via cfe-commits
@@ -111,9 +111,9 @@ class X86OpcodePrefixHelper { // 0b11: F2 // EVEX (4 bytes) - // +-+ +---+ ++ ++ - // | 62h | | RXBR' | B'mmm | | W | | X' | pp | | z | L'L | b | v' | aaa | - // +-+ +---

[clang] [PPC] Disable vsx and altivec when -msoft-float is used (PR #100450)

2024-07-31 Thread Chen Zheng via cfe-commits
@@ -690,6 +698,19 @@ bool PPCTargetInfo::initFeatureMap( return false; } + if (llvm::is_contained(FeaturesVec, "-hard-float")) { chenzheng1030 wrote: After another look, I still think this should be done in https://github.com/llvm/llvm-project/blob/ma

[clang] [PPC] Disable vsx and altivec when -msoft-float is used (PR #100450)

2024-07-31 Thread Chen Zheng via cfe-commits
https://github.com/chenzheng1030 commented: We still miss many implications in `PPCTargetInfo::setFeatureEnabled()`. This patch fixes the implications for `-msoft-float`. But implications like `-mno-power8-altivec` for `-crypto` is still not handled. Let's leave them for now and make this patc

[clang] [PPC] Disable vsx and altivec when -msoft-float is used (PR #100450)

2024-07-31 Thread Chen Zheng via cfe-commits
https://github.com/chenzheng1030 edited https://github.com/llvm/llvm-project/pull/100450 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [X86][AVX10.2] Support AVX10.2 option and VMPSADBW/VADDP[D,H,S] new instructions (PR #101452)

2024-07-31 Thread Freddy Ye via cfe-commits
@@ -0,0 +1,24 @@ +// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-unknown -target-feature +avx10.2-512 -emit-llvm -o - | FileCheck %s + FreddyLeaf wrote: is `-flax-vector-conversions=none` required? https://github.com/

[clang] [llvm] [X86][AVX10.2] Support AVX10.2 option and VMPSADBW/VADDP[D,H,S] new instructions (PR #101452)

2024-07-31 Thread Freddy Ye via cfe-commits
@@ -257,6 +257,8 @@ X86_FEATURE_COMPAT(USERMSR, "usermsr", 0) X86_FEATURE_COMPAT(AVX10_1, "avx10.1-256", 36) X86_FEATURE_COMPAT(AVX10_1_512, "avx10.1-512", 37) X86_FEATURE (ZU, "zu") +X86_FEATURE_COMPAT(

[clang] [llvm] [X86][AVX10.2] Support AVX10.2 option and VMPSADBW/VADDP[D,H,S] new instructions (PR #101452)

2024-07-31 Thread Freddy Ye via cfe-commits
@@ -257,6 +257,8 @@ X86_FEATURE_COMPAT(USERMSR, "usermsr", 0) X86_FEATURE_COMPAT(AVX10_1, "avx10.1-256", 36) X86_FEATURE_COMPAT(AVX10_1_512, "avx10.1-512", 37) X86_FEATURE (ZU, "zu") +X86_FEATURE_COMPAT(

[clang] [llvm] [X86][AVX10.2] Support AVX10.2 option and VMPSADBW/VADDP[D,H,S] new instructions (PR #101452)

2024-07-31 Thread Freddy Ye via cfe-commits
@@ -0,0 +1,105 @@ +// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-unknown -target-feature +avx10.2-256 -emit-llvm -o - | FileCheck %s + FreddyLeaf wrote: ditto https://github.com/llvm/llvm-project/pull/101452

[clang] [llvm] [X86][AVX10.2] Support AVX10.2 option and VMPSADBW/VADDP[D,H,S] new instructions (PR #101452)

2024-07-31 Thread Freddy Ye via cfe-commits
@@ -0,0 +1,24 @@ +// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-unknown -target-feature +avx10.2-512 -emit-llvm -o - | FileCheck %s + FreddyLeaf wrote: pls add i386 test. https://github.com/llvm/llvm-project/pull/101

[clang] [llvm] [X86][AVX10.2] Support AVX10.2 option and VMPSADBW/VADDP[D,H,S] new instructions (PR #101452)

2024-07-31 Thread Freddy Ye via cfe-commits
@@ -162,6 +162,9 @@ bool SemaX86::CheckBuiltinRoundingOrSAE(unsigned BuiltinID, CallExpr *TheCall) { case X86::BI__builtin_ia32_mulps512: case X86::BI__builtin_ia32_subpd512: case X86::BI__builtin_ia32_subps512: + case X86::BI__builtin_ia32_vaddpd256_round:

[clang] [llvm] [X86][AVX10.2] Support AVX10.2 option and VMPSADBW/VADDP[D,H,S] new instructions (PR #101452)

2024-07-31 Thread Freddy Ye via cfe-commits
@@ -0,0 +1,83 @@ +/*=== avx10_2niintrin.h - AVX10.2 new instruction intrinsics ---=== + * + * 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: Apach

[clang] [llvm] [X86][AVX10.2] Support AVX10.2 option and VMPSADBW/VADDP[D,H,S] new instructions (PR #101452)

2024-07-31 Thread Freddy Ye via cfe-commits
@@ -1819,7 +1819,7 @@ const StringMap sys::getHostCPUFeatures() { Features["avxvnniint16"] = HasLeaf7Subleaf1 && ((EDX >> 10) & 1) && HasAVXSave; Features["prefetchi"] = HasLeaf7Subleaf1 && ((EDX >> 14) & 1); Features["usermsr"] = HasLeaf7Subleaf1 && ((EDX >> 15) & 1);

[clang] [clang] Support -Wa, options -mmsa and -mno-msa (PR #99615)

2024-07-31 Thread YunQiang Su via cfe-commits
wzssyqa wrote: I think that you may need to detect that whether integrated-as is used. If so, pass `-target-feature` option. https://github.com/llvm/llvm-project/pull/99615 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[clang] [X86_32][C++] fix 0 sized struct case in vaarg. (PR #86388)

2024-07-31 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/86388 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CUDA] Add 'noconvergent' function and statement attribute (PR #100637)

2024-07-31 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: A revert isn't necessary just for the missing release note; a followup PR is fine. https://github.com/llvm/llvm-project/pull/100637 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

[clang] [clang] Support -Wa, options -mmsa and -mno-msa (PR #99615)

2024-07-31 Thread YunQiang Su via cfe-commits
wzssyqa wrote: I have a try of your patch ``` $ ./bin/clang --target=mips-linux-gnu -mfp64 -Wa,-mmsa nn.c error: unknown argument: '-mmsa' ``` ``` mipsel-linux-gnu-gcc-14 -mfp64 -Wa,-mmsa nn.c ``` has no such problem. https://github.com/llvm/llvm-project/pull/99615

[clang] [Clang][SemaCXX] Fix bug where unexpanded lambda captures where assumed to have size 1 (PR #101385)

2024-07-31 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/101385 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][SemaCXX] Fix bug where unexpanded lambda captures where assumed to have size 1 (PR #101385)

2024-07-31 Thread Younan Zhang via cfe-commits
zyn0217 wrote: Sorry I was wrong. I mixed up my patch along with this fix so I reapplied it to a clean branch locally, and this could also *fix* the above case. With this patch, we don't need to bother to handling PackExpansionExpr in the transform pass of PackIndexingExpr, which is great! ht

[clang] [clang] fix classification of a string literal expression used as initializer (PR #101447)

2024-07-31 Thread Eli Friedman via cfe-commits
@@ -119,8 +119,6 @@ static Cl::Kinds ClassifyInternal(ASTContext &Ctx, const Expr *E) { // First come the expressions that are always lvalues, unconditionally. case Expr::ObjCIsaExprClass: -// C++ [expr.prim.general]p1: A string literal is an lvalue. - case Expr::S

[clang] [llvm] [Clang] C++20 Coroutines: Introduce Frontend Attribute [[clang::coro_await_elidable]] (PR #99282)

2024-07-31 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 updated https://github.com/llvm/llvm-project/pull/99282 >From 55e27fdace4dabc0748c20ae5271b735dcc22e3e Mon Sep 17 00:00:00 2001 From: Yuxuan Chen Date: Tue, 4 Jun 2024 23:22:00 -0700 Subject: [PATCH] [Clang] Introduce [[clang::coro_await_elidable]] --- clang/

[clang] [Clang][OpenMP] fix issue: Implicit conversion with `pragma omp taskloop` #100536 (PR #101307)

2024-07-31 Thread via cfe-commits
HenryZ16 wrote: @jdoerfert @alexey-bataev https://github.com/llvm/llvm-project/pull/101307 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix classification of a string literal expression used as initializer (PR #101447)

2024-07-31 Thread Eli Friedman via cfe-commits
@@ -150,6 +148,12 @@ static Cl::Kinds ClassifyInternal(ASTContext &Ctx, const Expr *E) { case Expr::OMPIteratorExprClass: return Cl::CL_LValue; +// C++ [expr.prim.general]p1: A string literal is an lvalue. +// Except we special case them as prvalues when they ar

[clang] [clang] fix classification of a string literal expression used as initializer (PR #101447)

2024-07-31 Thread Eli Friedman via cfe-commits
@@ -119,8 +119,6 @@ static Cl::Kinds ClassifyInternal(ASTContext &Ctx, const Expr *E) { // First come the expressions that are always lvalues, unconditionally. case Expr::ObjCIsaExprClass: -// C++ [expr.prim.general]p1: A string literal is an lvalue. - case Expr::S

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2024-07-31 Thread Max Winkler via cfe-commits
@@ -4446,6 +4446,24 @@ CompareStandardConversionSequences(Sema &S, SourceLocation Loc, T1 = S.Context.getQualifiedType(UnqualT1, T1Quals); if (isa(T2) && T2Quals) T2 = S.Context.getQualifiedType(UnqualT2, T2Quals); + + if (S.getLangOpts().MSVCReferen

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2024-07-31 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 updated https://github.com/llvm/llvm-project/pull/99833 >From c66fee7969fc4bd8b5ce79085f0fc09cbc4147da Mon Sep 17 00:00:00 2001 From: MaxEW707 Date: Fri, 21 Jun 2024 20:37:40 -0700 Subject: [PATCH 01/11] Support MSVC lvalue to temporary reference binding --- clang/

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2024-07-31 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 updated https://github.com/llvm/llvm-project/pull/99833 >From c66fee7969fc4bd8b5ce79085f0fc09cbc4147da Mon Sep 17 00:00:00 2001 From: MaxEW707 Date: Fri, 21 Jun 2024 20:37:40 -0700 Subject: [PATCH 01/10] Support MSVC lvalue to temporary reference binding --- clang/

[clang] [llvm] [X86][AVX10.2] Support AVX10.2 option and VMPSADBW/VADDP[D,H,S] new instructions (PR #101452)

2024-07-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Phoebe Wang (phoebewang) Changes …nstructions Ref.: https://cdrdv2.intel.com/v1/dl/getContent/828965 --- Patch is 101.68 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/101452.diff 46 F

[clang] [llvm] [X86][AVX10.2] Support AVX10.2 option and VMPSADBW/VADDP[D,H,S] new instructions (PR #101452)

2024-07-31 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang edited https://github.com/llvm/llvm-project/pull/101452 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [X86][AVX10.2] Support AVX10.2 option and VMPSADBW/VADDP[D,H,S] new instructions (PR #101452)

2024-07-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-ir Author: Phoebe Wang (phoebewang) Changes …nstructions Ref.: https://cdrdv2.intel.com/v1/dl/getContent/828965 --- Patch is 101.68 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/101452.diff 46 Files

[clang] [llvm] [X86][AVX10.2] Support AVX10.2 option and VMPSADBW/VADDP[D,H,S] new instructions (PR #101452)

2024-07-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-mc @llvm/pr-subscribers-clang-driver Author: Phoebe Wang (phoebewang) Changes …nstructions Ref.: https://cdrdv2.intel.com/v1/dl/getContent/828965 --- Patch is 101.68 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-projec

[clang] [llvm] [X86][AVX10.2] Support AVX10.2 option and VMPSADBW/VADDP[D,H,S] new instructions (PR #101452)

2024-07-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-support Author: Phoebe Wang (phoebewang) Changes …nstructions Ref.: https://cdrdv2.intel.com/v1/dl/getContent/828965 --- Patch is 101.68 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/101452.diff 46

[clang] [llvm] [X86][AVX10.2] Support AVX10.2 option and VMPSADBW/VADDP[D,H,S] new instructions (PR #101452)

2024-07-31 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang edited https://github.com/llvm/llvm-project/pull/101452 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [X86][AVX10.2] Support AVX10.2 option and VMPSADBW/VADDP[D,H,S] new i… (PR #101452)

2024-07-31 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang created https://github.com/llvm/llvm-project/pull/101452 …nstructions Ref.: https://cdrdv2.intel.com/v1/dl/getContent/828965 >From 56b26bfaaa071dde226077531aaa46f4b671a815 Mon Sep 17 00:00:00 2001 From: "Wang, Phoebe" Date: Sat, 27 Jul 2024 22:21:32 +0800 Subject

[clang] [llvm] [RISCV] Add Syntacore SCR4 RV32/64 processors definition (PR #101321)

2024-07-31 Thread Pengcheng Wang via cfe-commits
@@ -106,6 +106,7 @@ Changes to the RISC-V Backend * `.balign N, 0`, `.p2align N, 0`, `.align N, 0` in code sections will now fill the required alignment space with a sequence of `0x0` bytes (the requested fill value) rather than NOPs. +* Added Syntacore SCR4 CPUs: ``-mcpu=s

[clang] [clang-tools-extra] [clang-tidy] Add support for bsl::optional (PR #101450)

2024-07-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Chris Cotter (ccotter) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/101450.diff 5 Files Affected: - (modified) clang-tools-extra/docs/ReleaseNotes.rst (+5) - (added) clang-tools-extra/test/clang-tidy/checkers/bugp

[clang] [clang-tools-extra] [clang-tidy] Add support for bsl::optional (PR #101450)

2024-07-31 Thread Chris Cotter via cfe-commits
https://github.com/ccotter created https://github.com/llvm/llvm-project/pull/101450 None >From f7e7681db6ad83878fd00cf250047c98b1b4f051 Mon Sep 17 00:00:00 2001 From: Chris Cotter Date: Tue, 23 Jul 2024 10:30:54 -0400 Subject: [PATCH] [clang-tidy] Add support for bsl::optional --- clang-tool

[clang] [Clang] Implement C++26’s P2893R3 ‘Variadic friends’ (PR #101448)

2024-07-31 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/101448 >From 1fd8db659961fd1702c0c786feb71ad6c5998aa8 Mon Sep 17 00:00:00 2001 From: Sirraide Date: Wed, 31 Jul 2024 21:44:02 +0200 Subject: [PATCH 1/6] [Parser] Parse variadic friends --- clang/include/clang/AST/De

[clang] [Clang] Implement C++26’s P2893R3 ‘Variadic friends’ (PR #101448)

2024-07-31 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 eb03279ddcc4bb655021101f0038ece2cec3158a da65e3b79893f64848caca47823ff2ed894ac97d --e

[clang] [Clang] Implement C++26’s P2893R3 ‘Variadic friends’ (PR #101448)

2024-07-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: None (Sirraide) Changes Implement P2893R3 ‘Variadic friends’ for C++26. The implementation proper is mostly done, from what I can tell, but I have a few questions, so I thought I’d be best to list them all here (some are for me t

[clang] [Clang] Implement C++26’s P2893R3 ‘Variadic friends’ (PR #101448)

2024-07-31 Thread via cfe-commits
https://github.com/Sirraide created https://github.com/llvm/llvm-project/pull/101448 Implement P2893R3 ‘Variadic friends’ for C++26. The implementation proper is mostly done, from what I can tell, but I have a few questions, so I thought I’d be best to list them all here (some are for me to i

[clang] [clang][CUDA] Add 'noconvergent' function and statement attribute (PR #100637)

2024-07-31 Thread Sameer Sahasrabuddhe via cfe-commits
ssahasra wrote: > > Please also update the documentation for the attribute and the release > > notes. > > It looks like you may have overlooked the request to add release notes for > this new feature. @darkbuck, please revert and address the documentation! https://github.com/llvm/llvm-projec

[clang] [clang] fix classification of a string literal expression used as initializer (PR #101447)

2024-07-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Matheus Izvekov (mizvekov) Changes Since 3bf72d7d64b8465acd4f4af1a469d68d9dc86058 we have made a simplification where we transform a string literal into a prvalue, where normally they would always be lvalues. This patch fixes expression

[clang] [clang] fix classification of a string literal expression used as initializer (PR #101447)

2024-07-31 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/101447 Since 3bf72d7d64b8465acd4f4af1a469d68d9dc86058 we have made a simplification where we transform a string literal into a prvalue, where normally they would always be lvalues. This patch fixes expression classi

[clang] Attach resource attributes to handle within record, instead of record (PR #101433)

2024-07-31 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/101433 >From b17ddcc6f2081135125d6178b22d033bcf7c0998 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Wed, 31 Jul 2024 17:01:56 -0700 Subject: [PATCH 1/3] add attrs to handle in record decl, add ast dump test to

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-07-31 Thread via cfe-commits
antangelo wrote: Friendly ping https://github.com/llvm/llvm-project/pull/98788 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] prevent assertion failure by avoiding casts on type declarations that require complete types (PR #101426)

2024-07-31 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik edited https://github.com/llvm/llvm-project/pull/101426 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] prevent assertion failure by avoiding casts on type declarations that require complete types (PR #101426)

2024-07-31 Thread Shafik Yaghmour via cfe-commits
@@ -9267,14 +9267,14 @@ bool Sema::RequireLiteralType(SourceLocation Loc, QualType T, if (!RT) return true; - const CXXRecordDecl *RD = cast(RT->getDecl()); - // A partially-defined class type can't be a literal type, because a literal // class type must have a t

[clang] [Clang] prevent assertion failure by avoiding casts on type declarations that require complete types (PR #101426)

2024-07-31 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik edited https://github.com/llvm/llvm-project/pull/101426 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] prevent assertion failure by avoiding casts on type declarations that require complete types (PR #101426)

2024-07-31 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: This looks good but you need to add a bit more details to your summary, more specifically what case caused the bug to emerge. I am also curious why this does not show up in C++, we obtain a similar diagnostic but no crash. https://github.com/llvm/llvm-pro

[clang] [Clang][SemaCXX] Fix bug where unexpanded lambda captures where assumed to have size 1 (PR #101385)

2024-07-31 Thread Younan Zhang via cfe-commits
zyn0217 wrote: I remembered @LYP951018 shared me with a case involving PackIndexingExprs that was incorrectly rejected due to the mishandling of PackExpansionExprs: ```cpp namespace init_capture_pack { void init_capture() { auto L = [](auto... x) { return [x...](auto... y) { retur

[clang] [llvm] [PPC] Implement BCD assist builtins (PR #101390)

2024-07-31 Thread Qiu Chaofan via cfe-commits
@@ -515,6 +515,16 @@ TARGET_BUILTIN(__builtin_altivec_vctzh, "V8UsV8Us", "", "power9-vector") TARGET_BUILTIN(__builtin_altivec_vctzw, "V4UiV4Ui", "", "power9-vector") TARGET_BUILTIN(__builtin_altivec_vctzd, "V2ULLiV2ULLi", "", "power9-vector") +// P7 BCD builtins. +TARGET_BUI

[clang] [SPARC][clang] Add -m(no-)v8plus flags handling (PR #98713)

2024-07-31 Thread Sergei Barannikov via cfe-commits
@@ -6077,6 +6077,10 @@ def mvis3 : Flag<["-"], "mvis3">, Group; def mno_vis3 : Flag<["-"], "mno-vis3">, Group; def mhard_quad_float : Flag<["-"], "mhard-quad-float">, Group; def msoft_quad_float : Flag<["-"], "msoft-quad-float">, Group; +def mv8plus : Flag<["-"], "mv8plus">,

[clang] [Clang] Improve generation of GEP and RecordDecl loop (PR #101434)

2024-07-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-codegen Author: Bill Wendling (bwendling) Changes As with other loops, we need only look at a RecordDecl's FieldDecls. Convert to using them. In the meantime, we can improve the generation of the 'counted_by' FieldDecl'

[clang] [Clang] Improve generation of GEP and RecordDecl loop (PR #101434)

2024-07-31 Thread Bill Wendling via cfe-commits
https://github.com/bwendling created https://github.com/llvm/llvm-project/pull/101434 As with other loops, we need only look at a RecordDecl's FieldDecls. Convert to using them. In the meantime, we can improve the generation of the 'counted_by' FieldDecl's GEP: create one GEP instead of a seri

[clang] Attach resource attributes to handle within record, instead of record (PR #101433)

2024-07-31 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 7583c484c81218ab4c8c2fba2774cb518d8bbd43 b17ddcc6f2081135125d6178b22d033bcf7c0998 --e

[clang] [lldb] [HLSL] Implement intangible AST type (PR #97362)

2024-07-31 Thread Helena Kotas via cfe-commits
hekota wrote: > > I also don't see anywhere that actually successfully uses > > `__builtin_hlsl_resource_t`. Am I missing it, or should I not expect to see > > it? > > You are correct - the type cannot be directly declared in user code, so the > tests only check for errors and that the type s

[clang] Attach resource attributes to handle within record, instead of record (PR #101433)

2024-07-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-hlsl Author: Joshua Batista (bob80905) Changes This PR attaches the resource attributes, `HLSLResourceAttr` and `HLSLResourceClassAttr`, to the handle contained within such resource classes like `RWBuffer`. CodeGen will now s

[clang] Attach resource attributes to handle within record, instead of record (PR #101433)

2024-07-31 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 created https://github.com/llvm/llvm-project/pull/101433 This PR attaches the resource attributes, `HLSLResourceAttr` and `HLSLResourceClassAttr`, to the handle contained within such resource classes like `RWBuffer`. CodeGen will now search for fields within HLSL re

[clang] [compiler-rt] [lldb] [llvm] [Support] Remove terminfo dependency (PR #92865)

2024-07-31 Thread Jonas Devlieghere via cfe-commits
JDevlieghere wrote: > Thanks @JDevlieghere! Could you add this special case? I'm happy to help but I wouldn't feel comfortable making such a change without being able to reproduce and test it. > The authoritatively established and supported way to link with `ncurses` on > most Linux platfor

[clang] [libcxx] [Clang] Add __common_type builtin (PR #99473)

2024-07-31 Thread Christopher Di Bella via cfe-commits
@@ -3058,6 +3058,133 @@ void Sema::NoteAllFoundTemplates(TemplateName Name) { } } +static QualType commonTypeImpl(Sema &S, TemplateName BaseTemplate, + SourceLocation TemplateLoc, + ArrayRef Ts) { + auto lookUpComm

[clang] [NFC][Clang] Clean up VisitUnaryPlus by removing unused FP feature check (PR #101412)

2024-07-31 Thread via cfe-commits
https://github.com/smanna12 closed https://github.com/llvm/llvm-project/pull/101412 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] d5d1cf0 - [NFC][Clang] Clean up VisitUnaryPlus by removing unused FP feature check (#101412)

2024-07-31 Thread via cfe-commits
Author: smanna12 Date: 2024-07-31T18:25:52-05:00 New Revision: d5d1cf05499ba9a0adc192c723f622fc13ef9c0b URL: https://github.com/llvm/llvm-project/commit/d5d1cf05499ba9a0adc192c723f622fc13ef9c0b DIFF: https://github.com/llvm/llvm-project/commit/d5d1cf05499ba9a0adc192c723f622fc13ef9c0b.diff LOG:

[clang] [compiler-rt] [lldb] [llvm] [Support] Remove terminfo dependency (PR #92865)

2024-07-31 Thread Bernhard Kaindl via cfe-commits
bernhardkaindl wrote: Thanks @JDevlieghere! Could you add this special case? The authoritatively established and supported way to link with `ncurses` on most Linux platforms would be to use `pkg-config --libs ncurses` to the `LDFLAGS` for `ncurses` for the given compile target. https://github

[clang] [llvm] [Clang] Fix definition of layout-compatible to ignore empty classes (PR #92103)

2024-07-31 Thread John McCall via cfe-commits
@@ -160,6 +160,9 @@ Bug Fixes in This Version Bug Fixes to Compiler Builtins ^^ +- ``__is_layout_compatible`` no longer requires the empty bases to be the same in two + standard-layout classes. It now only compares non-static data members. ---

[clang] [Clang] [NFC] Fix potential dereferencing of nullptr (PR #101405)

2024-07-31 Thread via cfe-commits
https://github.com/smanna12 closed https://github.com/llvm/llvm-project/pull/101405 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] cf79aba - [Clang] [NFC] Fix potential dereferencing of nullptr (#101405)

2024-07-31 Thread via cfe-commits
Author: smanna12 Date: 2024-07-31T17:36:21-05:00 New Revision: cf79aba99db4909437b8977a59c51bc8899ddb9c URL: https://github.com/llvm/llvm-project/commit/cf79aba99db4909437b8977a59c51bc8899ddb9c DIFF: https://github.com/llvm/llvm-project/commit/cf79aba99db4909437b8977a59c51bc8899ddb9c.diff LOG:

[clang] [llvm] [Clang] Fix definition of layout-compatible to ignore empty classes (PR #92103)

2024-07-31 Thread Vlad Serebrennikov via cfe-commits
@@ -160,6 +160,9 @@ Bug Fixes in This Version Bug Fixes to Compiler Builtins ^^ +- ``__is_layout_compatible`` no longer requires the empty bases to be the same in two + standard-layout classes. It now only compares non-static data members. ---

[clang] [clang][CodeGen] Zero init unspecified fields in initializers in C (PR #97121)

2024-07-31 Thread via cfe-commits
https://github.com/yabinc edited https://github.com/llvm/llvm-project/pull/97121 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] prevent assertion failure by avoiding casts on type declarations that require complete types (PR #101426)

2024-07-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Oleksandr T. (a-tarasyuk) Changes Fixes #101304 --- Full diff: https://github.com/llvm/llvm-project/pull/101426.diff 3 Files Affected: - (modified) clang/docs/ReleaseNotes.rst (+1) - (modified) clang/lib/Sema/SemaType.cpp (+2-2) - (mo

[clang] [clang][CodeGen] Zero init unspecified fields in initializers in C (PR #97121)

2024-07-31 Thread via cfe-commits
https://github.com/yabinc edited https://github.com/llvm/llvm-project/pull/97121 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] prevent assertion failure by avoiding casts on type declarations that require complete types (PR #101426)

2024-07-31 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk created https://github.com/llvm/llvm-project/pull/101426 Fixes #101304 >From c972795aed2357bbceed3a013e12384a70f49489 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Thu, 1 Aug 2024 01:27:09 +0300 Subject: [PATCH] [Clang] prevent assertion failure by avoiding cas

[clang] [NFC][Clang] Clean up VisitUnaryPlus by removing unused FP feature check (PR #101412)

2024-07-31 Thread via cfe-commits
smanna12 wrote: Thanks @zahiraam for reviews! https://github.com/llvm/llvm-project/pull/101412 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang] Fix definition of layout-compatible to ignore empty classes (PR #92103)

2024-07-31 Thread John McCall via cfe-commits
@@ -160,6 +160,9 @@ Bug Fixes in This Version Bug Fixes to Compiler Builtins ^^ +- ``__is_layout_compatible`` no longer requires the empty bases to be the same in two + standard-layout classes. It now only compares non-static data members. ---

[clang] [llvm] [Clang] Fix definition of layout-compatible to ignore empty classes (PR #92103)

2024-07-31 Thread John McCall via cfe-commits
https://github.com/rjmccall commented: The code changes look right to me. https://github.com/llvm/llvm-project/pull/92103 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   4   5   >