https://github.com/mikolaj-pirog updated https://github.com/llvm/llvm-project/pull/154719
From 5797ca82411245574d844b06f6b9621a60bd7a1c Mon Sep 17 00:00:00 2001 From: "Pirog, Mikolaj Maciej" <mikolaj.maciej.pi...@intel.com> Date: Wed, 20 Aug 2025 18:18:25 +0200 Subject: [PATCH 1/2] Enable warning on lax vector conversions --- clang/lib/Sema/SemaExpr.cpp | 20 ++++++------------- clang/lib/Sema/SemaOverload.cpp | 5 ++--- .../fp8-intrinsics/acle_neon_fp8_untyped.c | 2 +- ...-acle-__ARM_FEATURE_SVE_VECTOR_OPERATORS.c | 10 +++++----- ...cle-__ARM_FEATURE_SVE_VECTOR_OPERATORS.cpp | 10 +++++----- .../test/CodeGen/AArch64/targetattr-crypto.c | 2 +- .../LoongArch/lasx/builtin-alias-error.c | 2 +- .../CodeGen/LoongArch/lasx/builtin-error.c | 4 ++-- .../LoongArch/lsx/builtin-alias-error.c | 2 +- .../CodeGen/LoongArch/lsx/builtin-error.c | 4 ++-- clang/test/CodeGen/SystemZ/zvector.c | 2 +- clang/test/CodeGen/SystemZ/zvector2.c | 2 +- clang/test/CodeGen/builtins-mips-msa-error.c | 2 +- clang/test/CodeGen/target-builtin-error-3.c | 4 ++-- clang/test/CodeGen/vector.c | 2 +- clang/test/Sema/aarch64-neon-target.c | 4 ++-- .../aarch64-neon-without-target-feature.cpp | 2 +- clang/test/Sema/arm-bfloat.cpp | 6 +++--- clang/test/Sema/arm-cde-immediates.c | 2 +- clang/test/Sema/arm-mve-immediates.c | 2 +- clang/test/Sema/arm-neon-target.c | 2 +- clang/test/Sema/arm-neon-types.c | 2 +- clang/test/Sema/arm64-neon-header.c | 2 +- clang/test/Sema/attr-arm-sve-vector-bits.c | 10 +++++----- clang/test/Sema/attr-riscv-rvv-vector-bits.c | 10 +++++----- clang/test/Sema/builtins-hvx-none.c | 6 +++--- clang/test/Sema/builtins-hvx-v60.c | 6 +++--- clang/test/Sema/builtins-hvx-v62.c | 6 +++--- clang/test/Sema/builtins-hvx-v65.c | 2 +- clang/test/Sema/builtins-mips-features.c | 2 +- clang/test/Sema/builtins-x86.c | 2 +- clang/test/Sema/constant-builtins-vector.cpp | 12 +++++------ clang/test/Sema/conversion-64-32.c | 2 +- ...onversion-implicit-int-includes-64-to-32.c | 2 +- clang/test/Sema/ext_vector_ops.c | 2 +- clang/test/Sema/overload-arm-mve.c | 4 ++-- clang/test/Sema/vector-assign.c | 2 +- clang/test/Sema/vector-cast.c | 2 +- clang/test/Sema/vector-gcc-compat.c | 2 +- clang/test/Sema/vector-gcc-compat.cpp | 2 +- clang/test/Sema/vector-init.c | 2 +- clang/test/Sema/vector-ops.c | 2 +- .../test/SemaCXX/attr-arm-sve-vector-bits.cpp | 2 +- .../SemaCXX/attr-riscv-rvv-vector-bits.cpp | 2 +- clang/test/SemaCXX/vector.cpp | 12 +++++------ 45 files changed, 90 insertions(+), 99 deletions(-) diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index 237c068f59283..bbea2a0a238dd 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -9370,12 +9370,9 @@ AssignConvertType Sema::CheckAssignmentConstraints(QualType LHSType, // vectors, the total size only needs to be the same. This is a bitcast; // no bits are changed but the result type is different. if (isLaxVectorConversion(RHSType, LHSType)) { - // The default for lax vector conversions with Altivec vectors will - // change, so if we are converting between vector types where - // at least one is an Altivec vector, emit a warning. - if (Context.getTargetInfo().getTriple().isPPC() && - anyAltivecTypes(RHSType, LHSType) && - !Context.areCompatibleVectorTypes(RHSType, LHSType)) + // The default for lax vector conversions will + // change, so if we are converting between vector emit a warning. + if (!Context.areCompatibleVectorTypes(RHSType, LHSType)) Diag(RHS.get()->getExprLoc(), diag::warn_deprecated_lax_vec_conv_all) << RHSType << LHSType; Kind = CK_BitCast; @@ -9391,12 +9388,8 @@ AssignConvertType Sema::CheckAssignmentConstraints(QualType LHSType, const VectorType *VecType = RHSType->getAs<VectorType>(); if (VecType && VecType->getNumElements() == 1 && isLaxVectorConversion(RHSType, LHSType)) { - if (Context.getTargetInfo().getTriple().isPPC() && - (VecType->getVectorKind() == VectorKind::AltiVecVector || - VecType->getVectorKind() == VectorKind::AltiVecBool || - VecType->getVectorKind() == VectorKind::AltiVecPixel)) - Diag(RHS.get()->getExprLoc(), diag::warn_deprecated_lax_vec_conv_all) - << RHSType << LHSType; + Diag(RHS.get()->getExprLoc(), diag::warn_deprecated_lax_vec_conv_all) + << RHSType << LHSType; ExprResult *VecExpr = &RHS; *VecExpr = ImpCastExprToType(VecExpr->get(), LHSType, CK_BitCast); Kind = CK_BitCast; @@ -10467,8 +10460,7 @@ QualType Sema::CheckVectorOperands(ExprResult &LHS, ExprResult &RHS, QualType OtherType = LHSVecType ? RHSType : LHSType; ExprResult *OtherExpr = LHSVecType ? &RHS : &LHS; if (isLaxVectorConversion(OtherType, VecType)) { - if (Context.getTargetInfo().getTriple().isPPC() && - anyAltivecTypes(RHSType, LHSType) && + if (!OtherType->isVectorType() || !Context.areCompatibleVectorTypes(RHSType, LHSType)) Diag(Loc, diag::warn_deprecated_lax_vec_conv_all) << RHSType << LHSType; // If we're allowing lax vector conversions, only the total (data) size diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp index 7c4405b414c47..9e45b0d23557a 100644 --- a/clang/lib/Sema/SemaOverload.cpp +++ b/clang/lib/Sema/SemaOverload.cpp @@ -2206,9 +2206,8 @@ static bool IsVectorConversion(Sema &S, QualType FromType, QualType ToType, if (S.Context.areCompatibleVectorTypes(FromType, ToType) || (S.isLaxVectorConversion(FromType, ToType) && !ToType->hasAttr(attr::ArmMveStrictPolymorphism))) { - if (S.getASTContext().getTargetInfo().getTriple().isPPC() && - S.isLaxVectorConversion(FromType, ToType) && - S.anyAltivecTypes(FromType, ToType) && + if (S.isLaxVectorConversion(FromType, ToType) && + !S.Context.areCompatibleVectorTypes(FromType, ToType) && !InOverloadResolution && !CStyle) { S.Diag(From->getBeginLoc(), diag::warn_deprecated_lax_vec_conv_all) diff --git a/clang/test/CodeGen/AArch64/fp8-intrinsics/acle_neon_fp8_untyped.c b/clang/test/CodeGen/AArch64/fp8-intrinsics/acle_neon_fp8_untyped.c index fdc861836baf7..b7eb951edb7eb 100644 --- a/clang/test/CodeGen/AArch64/fp8-intrinsics/acle_neon_fp8_untyped.c +++ b/clang/test/CodeGen/AArch64/fp8-intrinsics/acle_neon_fp8_untyped.c @@ -1,7 +1,7 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 #include <arm_neon.h> -// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +neon -target-feature +lut -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -p mem2reg,sroa | FileCheck %s +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -triple aarch64-none-linux-gnu -target-feature +neon -target-feature +lut -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -p mem2reg,sroa | FileCheck %s // REQUIRES: aarch64-registered-target diff --git a/clang/test/CodeGen/AArch64/sve-acle-__ARM_FEATURE_SVE_VECTOR_OPERATORS.c b/clang/test/CodeGen/AArch64/sve-acle-__ARM_FEATURE_SVE_VECTOR_OPERATORS.c index 4a1185d02981b..4c1a55b8d04ac 100644 --- a/clang/test/CodeGen/AArch64/sve-acle-__ARM_FEATURE_SVE_VECTOR_OPERATORS.c +++ b/clang/test/CodeGen/AArch64/sve-acle-__ARM_FEATURE_SVE_VECTOR_OPERATORS.c @@ -1,8 +1,8 @@ -// RUN: %clang_cc1 -triple aarch64 -target-feature +sve -O1 -Werror -Wall -emit-llvm -o - %s -mvscale-min=1 -mvscale-max=1 | FileCheck %s -D#VBITS=128 --check-prefixes=CHECK128 -// RUN: %clang_cc1 -triple aarch64 -target-feature +sve -O1 -Werror -Wall -emit-llvm -o - %s -mvscale-min=2 -mvscale-max=2 | FileCheck %s -D#VBITS=256 --check-prefixes=CHECK,CHECK256 -// RUN: %clang_cc1 -triple aarch64 -target-feature +sve -O1 -Werror -Wall -emit-llvm -o - %s -mvscale-min=4 -mvscale-max=4 | FileCheck %s -D#VBITS=512 --check-prefixes=CHECK,CHECK512 -// RUN: %clang_cc1 -triple aarch64 -target-feature +sve -O1 -Werror -Wall -emit-llvm -o - %s -mvscale-min=8 -mvscale-max=8 | FileCheck %s -D#VBITS=1024 --check-prefixes=CHECK,CHECK1024 -// RUN: %clang_cc1 -triple aarch64 -target-feature +sve -O1 -Werror -Wall -emit-llvm -o - %s -mvscale-min=16 -mvscale-max=16 | FileCheck %s -D#VBITS=2048 --check-prefixes=CHECK,CHECK2048 +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -triple aarch64 -target-feature +sve -O1 -Werror -Wall -emit-llvm -o - %s -mvscale-min=1 -mvscale-max=1 | FileCheck %s -D#VBITS=128 --check-prefixes=CHECK128 +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -triple aarch64 -target-feature +sve -O1 -Werror -Wall -emit-llvm -o - %s -mvscale-min=2 -mvscale-max=2 | FileCheck %s -D#VBITS=256 --check-prefixes=CHECK,CHECK256 +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -triple aarch64 -target-feature +sve -O1 -Werror -Wall -emit-llvm -o - %s -mvscale-min=4 -mvscale-max=4 | FileCheck %s -D#VBITS=512 --check-prefixes=CHECK,CHECK512 +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -triple aarch64 -target-feature +sve -O1 -Werror -Wall -emit-llvm -o - %s -mvscale-min=8 -mvscale-max=8 | FileCheck %s -D#VBITS=1024 --check-prefixes=CHECK,CHECK1024 +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -triple aarch64 -target-feature +sve -O1 -Werror -Wall -emit-llvm -o - %s -mvscale-min=16 -mvscale-max=16 | FileCheck %s -D#VBITS=2048 --check-prefixes=CHECK,CHECK2048 // REQUIRES: aarch64-registered-target diff --git a/clang/test/CodeGen/AArch64/sve-acle-__ARM_FEATURE_SVE_VECTOR_OPERATORS.cpp b/clang/test/CodeGen/AArch64/sve-acle-__ARM_FEATURE_SVE_VECTOR_OPERATORS.cpp index 6211b609d6d28..c67b8955d36be 100644 --- a/clang/test/CodeGen/AArch64/sve-acle-__ARM_FEATURE_SVE_VECTOR_OPERATORS.cpp +++ b/clang/test/CodeGen/AArch64/sve-acle-__ARM_FEATURE_SVE_VECTOR_OPERATORS.cpp @@ -1,8 +1,8 @@ -// RUN: %clang_cc1 -x c++ -triple aarch64 -target-feature +sve -O1 -Werror -Wall -emit-llvm -o - %s -mvscale-min=1 -mvscale-max=1 | FileCheck %s -D#VBITS=128 --check-prefixes=CHECK,CHECK128 -// RUN: %clang_cc1 -x c++ -triple aarch64 -target-feature +sve -O1 -Werror -Wall -emit-llvm -o - %s -mvscale-min=2 -mvscale-max=2 | FileCheck %s -D#VBITS=256 --check-prefixes=CHECK,CHECKWIDE -// RUN: %clang_cc1 -x c++ -triple aarch64 -target-feature +sve -O1 -Werror -Wall -emit-llvm -o - %s -mvscale-min=4 -mvscale-max=4 | FileCheck %s -D#VBITS=512 --check-prefixes=CHECK,CHECKWIDE -// RUN: %clang_cc1 -x c++ -triple aarch64 -target-feature +sve -O1 -Werror -Wall -emit-llvm -o - %s -mvscale-min=8 -mvscale-max=8 | FileCheck %s -D#VBITS=1024 --check-prefixes=CHECK,CHECKWIDE -// RUN: %clang_cc1 -x c++ -triple aarch64 -target-feature +sve -O1 -Werror -Wall -emit-llvm -o - %s -mvscale-min=16 -mvscale-max=16 | FileCheck %s -D#VBITS=2048 --check-prefixes=CHECK,CHECKWIDE +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -x c++ -triple aarch64 -target-feature +sve -O1 -Werror -Wall -emit-llvm -o - %s -mvscale-min=1 -mvscale-max=1 | FileCheck %s -D#VBITS=128 --check-prefixes=CHECK,CHECK128 +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -x c++ -triple aarch64 -target-feature +sve -O1 -Werror -Wall -emit-llvm -o - %s -mvscale-min=2 -mvscale-max=2 | FileCheck %s -D#VBITS=256 --check-prefixes=CHECK,CHECKWIDE +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -x c++ -triple aarch64 -target-feature +sve -O1 -Werror -Wall -emit-llvm -o - %s -mvscale-min=4 -mvscale-max=4 | FileCheck %s -D#VBITS=512 --check-prefixes=CHECK,CHECKWIDE +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -x c++ -triple aarch64 -target-feature +sve -O1 -Werror -Wall -emit-llvm -o - %s -mvscale-min=8 -mvscale-max=8 | FileCheck %s -D#VBITS=1024 --check-prefixes=CHECK,CHECKWIDE +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -x c++ -triple aarch64 -target-feature +sve -O1 -Werror -Wall -emit-llvm -o - %s -mvscale-min=16 -mvscale-max=16 | FileCheck %s -D#VBITS=2048 --check-prefixes=CHECK,CHECKWIDE // REQUIRES: aarch64-registered-target diff --git a/clang/test/CodeGen/AArch64/targetattr-crypto.c b/clang/test/CodeGen/AArch64/targetattr-crypto.c index 006a394be7775..f3183a6ba04d7 100644 --- a/clang/test/CodeGen/AArch64/targetattr-crypto.c +++ b/clang/test/CodeGen/AArch64/targetattr-crypto.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple aarch64 -target-feature +v8a -verify -S %s -o - +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -triple aarch64 -target-feature +v8a -verify -S %s -o - // REQUIRES: aarch64-registered-target #include <arm_neon.h> diff --git a/clang/test/CodeGen/LoongArch/lasx/builtin-alias-error.c b/clang/test/CodeGen/LoongArch/lasx/builtin-alias-error.c index 2a3862bbe3c18..99145124ac74e 100644 --- a/clang/test/CodeGen/LoongArch/lasx/builtin-alias-error.c +++ b/clang/test/CodeGen/LoongArch/lasx/builtin-alias-error.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple loongarch64 -target-feature +lasx -verify %s +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -triple loongarch64 -target-feature +lasx -verify %s #include <lasxintrin.h> diff --git a/clang/test/CodeGen/LoongArch/lasx/builtin-error.c b/clang/test/CodeGen/LoongArch/lasx/builtin-error.c index dabf34368ea3e..e484a69825072 100644 --- a/clang/test/CodeGen/LoongArch/lasx/builtin-error.c +++ b/clang/test/CodeGen/LoongArch/lasx/builtin-error.c @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -triple loongarch64 -target-feature +lasx -verify %s -// RUN: not %clang_cc1 -triple loongarch64 -DFEATURE_CHECK -emit-llvm %s -o /dev/null 2>&1 \ +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -triple loongarch64 -target-feature +lasx -verify %s +// RUN: not %clang_cc1 -Wno-deprecate-lax-vec-conv-all -triple loongarch64 -DFEATURE_CHECK -emit-llvm %s -o /dev/null 2>&1 \ // RUN: | FileCheck %s typedef signed char v32i8 __attribute__((vector_size(32), aligned(32))); diff --git a/clang/test/CodeGen/LoongArch/lsx/builtin-alias-error.c b/clang/test/CodeGen/LoongArch/lsx/builtin-alias-error.c index 69cf2254fdd79..3590535a685db 100644 --- a/clang/test/CodeGen/LoongArch/lsx/builtin-alias-error.c +++ b/clang/test/CodeGen/LoongArch/lsx/builtin-alias-error.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple loongarch64 -target-feature +lsx -verify %s +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -triple loongarch64 -target-feature +lsx -verify %s #include <lsxintrin.h> diff --git a/clang/test/CodeGen/LoongArch/lsx/builtin-error.c b/clang/test/CodeGen/LoongArch/lsx/builtin-error.c index 722ba7fe8cd20..1bdb225b97ebe 100644 --- a/clang/test/CodeGen/LoongArch/lsx/builtin-error.c +++ b/clang/test/CodeGen/LoongArch/lsx/builtin-error.c @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -triple loongarch64 -target-feature +lsx -verify %s -// RUN: not %clang_cc1 -triple loongarch64 -DFEATURE_CHECK -emit-llvm %s -o /dev/null 2>&1 \ +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -triple loongarch64 -target-feature +lsx -verify %s +// RUN: not %clang_cc1 -Wno-deprecate-lax-vec-conv-all -triple loongarch64 -DFEATURE_CHECK -emit-llvm %s -o /dev/null 2>&1 \ // RUN: | FileCheck %s typedef signed char v16i8 __attribute__((vector_size(16), aligned(16))); diff --git a/clang/test/CodeGen/SystemZ/zvector.c b/clang/test/CodeGen/SystemZ/zvector.c index a0b654d9acc9a..78d1e1ff169fb 100644 --- a/clang/test/CodeGen/SystemZ/zvector.c +++ b/clang/test/CodeGen/SystemZ/zvector.c @@ -1,5 +1,5 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 -// RUN: %clang_cc1 -triple s390x-linux-gnu -target-cpu z13 -fzvector \ +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -triple s390x-linux-gnu -target-cpu z13 -fzvector \ // RUN: -emit-llvm -o - -W -Wall -Werror \ // RUN: %s | opt -S -passes=mem2reg | FileCheck %s diff --git a/clang/test/CodeGen/SystemZ/zvector2.c b/clang/test/CodeGen/SystemZ/zvector2.c index b021ae8534353..32f18fd5c341e 100644 --- a/clang/test/CodeGen/SystemZ/zvector2.c +++ b/clang/test/CodeGen/SystemZ/zvector2.c @@ -1,5 +1,5 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 -// RUN: %clang_cc1 -triple s390x-linux-gnu -target-cpu z14 -fzvector \ +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -triple s390x-linux-gnu -target-cpu z14 -fzvector \ // RUN: -O -emit-llvm -o - -W -Wall -Werror %s | FileCheck %s volatile vector float ff, ff2; diff --git a/clang/test/CodeGen/builtins-mips-msa-error.c b/clang/test/CodeGen/builtins-mips-msa-error.c index 11ddb08d9f4e9..4feef67720f81 100644 --- a/clang/test/CodeGen/builtins-mips-msa-error.c +++ b/clang/test/CodeGen/builtins-mips-msa-error.c @@ -1,5 +1,5 @@ // REQUIRES: mips-registered-target -// RUN: %clang_cc1 -triple mips-unknown-linux-gnu -fsyntax-only %s \ +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -triple mips-unknown-linux-gnu -fsyntax-only %s \ // RUN: -target-feature +msa -target-feature +fp64 \ // RUN: -verify -mfloat-abi hard -o - 2>&1 diff --git a/clang/test/CodeGen/target-builtin-error-3.c b/clang/test/CodeGen/target-builtin-error-3.c index 3de76e253d9b1..7c668a071ac75 100644 --- a/clang/test/CodeGen/target-builtin-error-3.c +++ b/clang/test/CodeGen/target-builtin-error-3.c @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -S -verify -o - -target-feature +avx +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all %s -triple=x86_64-apple-darwin -S -verify -o - -target-feature +avx -// RUN: not %clang_cc1 %s -triple=x86_64-apple-darwin -emit-obj -target-feature +avx 2> %t.err +// RUN: not %clang_cc1 -Wno-deprecate-lax-vec-conv-all %s -triple=x86_64-apple-darwin -emit-obj -target-feature +avx 2> %t.err // RUN: FileCheck < %t.err %s // CHECK: 1 error generated diff --git a/clang/test/CodeGen/vector.c b/clang/test/CodeGen/vector.c index 5d677aaf16948..327fe447b0e15 100644 --- a/clang/test/CodeGen/vector.c +++ b/clang/test/CodeGen/vector.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -ffreestanding -triple i386-apple-darwin9 -O1 -target-cpu corei7 -debug-info-kind=limited -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -ffreestanding -triple i386-apple-darwin9 -O1 -target-cpu corei7 -debug-info-kind=limited -emit-llvm %s -o - | FileCheck %s typedef short __v4hi __attribute__ ((__vector_size__ (8))); void test1(void) { diff --git a/clang/test/Sema/aarch64-neon-target.c b/clang/test/Sema/aarch64-neon-target.c index 07d763ec84bd1..95037081930ea 100644 --- a/clang/test/Sema/aarch64-neon-target.c +++ b/clang/test/Sema/aarch64-neon-target.c @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +neon -verify -emit-llvm -o - %s -// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +neon -target-feature +outline-atomics -verify -emit-llvm -o - %s +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -triple aarch64-none-linux-gnu -target-feature +neon -verify -emit-llvm -o - %s +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -triple aarch64-none-linux-gnu -target-feature +neon -target-feature +outline-atomics -verify -emit-llvm -o - %s // REQUIRES: aarch64-registered-target // Test that functions with the correct target attributes can use the correct NEON intrinsics. diff --git a/clang/test/Sema/aarch64-neon-without-target-feature.cpp b/clang/test/Sema/aarch64-neon-without-target-feature.cpp index 0831eb7c754a7..b923e8f34fe7c 100644 --- a/clang/test/Sema/aarch64-neon-without-target-feature.cpp +++ b/clang/test/Sema/aarch64-neon-without-target-feature.cpp @@ -1,4 +1,4 @@ -// 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 +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -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 // REQUIRES: aarch64-registered-target diff --git a/clang/test/Sema/arm-bfloat.cpp b/clang/test/Sema/arm-bfloat.cpp index 6a3eacd331d5c..8d1af142e3a71 100644 --- a/clang/test/Sema/arm-bfloat.cpp +++ b/clang/test/Sema/arm-bfloat.cpp @@ -1,12 +1,12 @@ -// RUN: %clang_cc1 -fsyntax-only -verify=scalar,neon -std=c++11 \ +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -fsyntax-only -verify=scalar,neon -std=c++11 \ // RUN: -triple aarch64 -target-cpu cortex-a75 \ // RUN: -target-feature +bf16 -target-feature +neon -Wno-unused %s -// RUN: %clang_cc1 -fsyntax-only -verify=scalar,neon -std=c++11 \ +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -fsyntax-only -verify=scalar,neon -std=c++11 \ // RUN: -triple arm-arm-none-eabi -target-cpu cortex-a53 \ // RUN: -target-feature +bf16 -target-feature +neon -Wno-unused %s // The types should be available under AArch64 even without the bf16 feature -// RUN: %clang_cc1 -fsyntax-only -verify=scalar -DNONEON -std=c++11 \ +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -fsyntax-only -verify=scalar -DNONEON -std=c++11 \ // RUN: -triple aarch64 -target-cpu cortex-a75 \ // RUN: -target-feature -bf16 -target-feature +neon -Wno-unused %s diff --git a/clang/test/Sema/arm-cde-immediates.c b/clang/test/Sema/arm-cde-immediates.c index 78962478ac440..540d6d5f43dff 100644 --- a/clang/test/Sema/arm-cde-immediates.c +++ b/clang/test/Sema/arm-cde-immediates.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple thumbv8.1m.main-none-none-eabi -target-feature +mve.fp -target-feature +cdecp0 -verify -fsyntax-only %s +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -triple thumbv8.1m.main-none-none-eabi -target-feature +mve.fp -target-feature +cdecp0 -verify -fsyntax-only %s // REQUIRES: aarch64-registered-target || arm-registered-target diff --git a/clang/test/Sema/arm-mve-immediates.c b/clang/test/Sema/arm-mve-immediates.c index db909a0aa8b0c..25368ed8c1e05 100644 --- a/clang/test/Sema/arm-mve-immediates.c +++ b/clang/test/Sema/arm-mve-immediates.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple thumbv8.1m.main-none-none-eabi -target-feature +mve.fp -verify -fsyntax-only %s +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -triple thumbv8.1m.main-none-none-eabi -target-feature +mve.fp -verify -fsyntax-only %s // REQUIRES: aarch64-registered-target || arm-registered-target diff --git a/clang/test/Sema/arm-neon-target.c b/clang/test/Sema/arm-neon-target.c index 1dc2b00925d61..6859fb1219a3c 100644 --- a/clang/test/Sema/arm-neon-target.c +++ b/clang/test/Sema/arm-neon-target.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple armv8a-none-linux-gnu -target-feature +neon -verify -emit-llvm -o - %s +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -triple armv8a-none-linux-gnu -target-feature +neon -verify -emit-llvm -o - %s // REQUIRES: arm-registered-target // Test that functions with the correct target attributes can use the correct NEON intrinsics. diff --git a/clang/test/Sema/arm-neon-types.c b/clang/test/Sema/arm-neon-types.c index 499cd271293b7..55ad5e6a0dc9b 100644 --- a/clang/test/Sema/arm-neon-types.c +++ b/clang/test/Sema/arm-neon-types.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple thumbv7-apple-darwin10 -target-cpu cortex-a8 -fsyntax-only -Wvector-conversion -ffreestanding -verify %s +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -triple thumbv7-apple-darwin10 -target-cpu cortex-a8 -fsyntax-only -Wvector-conversion -ffreestanding -verify %s // REQUIRES: aarch64-registered-target || arm-registered-target #ifndef INCLUDE diff --git a/clang/test/Sema/arm64-neon-header.c b/clang/test/Sema/arm64-neon-header.c index 033d26b642be8..231684a866ef1 100644 --- a/clang/test/Sema/arm64-neon-header.c +++ b/clang/test/Sema/arm64-neon-header.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple arm64-apple-darwin -target-feature +neon -Wvector-conversion -fsyntax-only -ffreestanding -verify %s +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -triple arm64-apple-darwin -target-feature +neon -Wvector-conversion -fsyntax-only -ffreestanding -verify %s // REQUIRES: aarch64-registered-target || arm-registered-target diff --git a/clang/test/Sema/attr-arm-sve-vector-bits.c b/clang/test/Sema/attr-arm-sve-vector-bits.c index 447addb4d5d33..1a55f5eef5731 100644 --- a/clang/test/Sema/attr-arm-sve-vector-bits.c +++ b/clang/test/Sema/attr-arm-sve-vector-bits.c @@ -1,8 +1,8 @@ -// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -target-feature +bf16 -target-feature +sme -ffreestanding -fsyntax-only -verify=expected,streamingdifferent -mvscale-min=1 -mvscale-max=1 %s -// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -target-feature +bf16 -target-feature +sme -ffreestanding -fsyntax-only -verify=expected,streamingdifferent -mvscale-min=2 -mvscale-max=2 -mvscale-streaming-min=2 %s -// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -target-feature +bf16 -target-feature +sme -ffreestanding -fsyntax-only -verify=expected -mvscale-min=4 -mvscale-max=4 -mvscale-streaming-min=4 -mvscale-streaming-max=4 %s -// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -target-feature +bf16 -target-feature +sme -ffreestanding -fsyntax-only -verify=expected,streamingdifferent -mvscale-min=8 -mvscale-max=8 -mvscale-streaming-min=4 -mvscale-streaming-max=8 %s -// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -target-feature +bf16 -target-feature +sme -ffreestanding -fsyntax-only -verify=expected,streamingdifferent -mvscale-min=16 -mvscale-max=16 %s +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -triple aarch64-none-linux-gnu -target-feature +sve -target-feature +bf16 -target-feature +sme -ffreestanding -fsyntax-only -verify=expected,streamingdifferent -mvscale-min=1 -mvscale-max=1 %s +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -triple aarch64-none-linux-gnu -target-feature +sve -target-feature +bf16 -target-feature +sme -ffreestanding -fsyntax-only -verify=expected,streamingdifferent -mvscale-min=2 -mvscale-max=2 -mvscale-streaming-min=2 %s +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -triple aarch64-none-linux-gnu -target-feature +sve -target-feature +bf16 -target-feature +sme -ffreestanding -fsyntax-only -verify=expected -mvscale-min=4 -mvscale-max=4 -mvscale-streaming-min=4 -mvscale-streaming-max=4 %s +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -triple aarch64-none-linux-gnu -target-feature +sve -target-feature +bf16 -target-feature +sme -ffreestanding -fsyntax-only -verify=expected,streamingdifferent -mvscale-min=8 -mvscale-max=8 -mvscale-streaming-min=4 -mvscale-streaming-max=8 %s +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -triple aarch64-none-linux-gnu -target-feature +sve -target-feature +bf16 -target-feature +sme -ffreestanding -fsyntax-only -verify=expected,streamingdifferent -mvscale-min=16 -mvscale-max=16 %s #include <stdint.h> diff --git a/clang/test/Sema/attr-riscv-rvv-vector-bits.c b/clang/test/Sema/attr-riscv-rvv-vector-bits.c index 9ac904b043f82..26691f06ac624 100644 --- a/clang/test/Sema/attr-riscv-rvv-vector-bits.c +++ b/clang/test/Sema/attr-riscv-rvv-vector-bits.c @@ -1,8 +1,8 @@ -// RUN: %clang_cc1 -triple riscv64-none-linux-gnu -target-feature +f -target-feature +d -target-feature +zve64d -ffreestanding -fsyntax-only -verify -mvscale-min=1 -mvscale-max=1 %s -// RUN: %clang_cc1 -triple riscv64-none-linux-gnu -target-feature +f -target-feature +d -target-feature +zve64d -ffreestanding -fsyntax-only -verify -mvscale-min=2 -mvscale-max=2 %s -// RUN: %clang_cc1 -triple riscv64-none-linux-gnu -target-feature +f -target-feature +d -target-feature +zve64d -ffreestanding -fsyntax-only -verify -mvscale-min=4 -mvscale-max=4 %s -// RUN: %clang_cc1 -triple riscv64-none-linux-gnu -target-feature +f -target-feature +d -target-feature +zve64d -ffreestanding -fsyntax-only -verify -mvscale-min=8 -mvscale-max=8 %s -// RUN: %clang_cc1 -triple riscv64-none-linux-gnu -target-feature +f -target-feature +d -target-feature +zve64d -ffreestanding -fsyntax-only -verify -mvscale-min=16 -mvscale-max=16 %s +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -triple riscv64-none-linux-gnu -target-feature +f -target-feature +d -target-feature +zve64d -ffreestanding -fsyntax-only -verify -mvscale-min=1 -mvscale-max=1 %s +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -triple riscv64-none-linux-gnu -target-feature +f -target-feature +d -target-feature +zve64d -ffreestanding -fsyntax-only -verify -mvscale-min=2 -mvscale-max=2 %s +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -triple riscv64-none-linux-gnu -target-feature +f -target-feature +d -target-feature +zve64d -ffreestanding -fsyntax-only -verify -mvscale-min=4 -mvscale-max=4 %s +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -triple riscv64-none-linux-gnu -target-feature +f -target-feature +d -target-feature +zve64d -ffreestanding -fsyntax-only -verify -mvscale-min=8 -mvscale-max=8 %s +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -triple riscv64-none-linux-gnu -target-feature +f -target-feature +d -target-feature +zve64d -ffreestanding -fsyntax-only -verify -mvscale-min=16 -mvscale-max=16 %s #include <stdint.h> diff --git a/clang/test/Sema/builtins-hvx-none.c b/clang/test/Sema/builtins-hvx-none.c index ad1b7332b5b8c..db61803e6f786 100644 --- a/clang/test/Sema/builtins-hvx-none.c +++ b/clang/test/Sema/builtins-hvx-none.c @@ -1,7 +1,7 @@ // REQUIRES: hexagon-registered-target -// RUN: %clang_cc1 -triple hexagon %s -target-cpu hexagonv60 -DTEST_HVXV60 -verify -S -o - -// RUN: %clang_cc1 -triple hexagon %s -target-cpu hexagonv60 -DTEST_HVXV62 -verify -S -o - -// RUN: %clang_cc1 -triple hexagon %s -target-cpu hexagonv60 -DTEST_HVXV65 -verify -S -o - +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -triple hexagon %s -target-cpu hexagonv60 -DTEST_HVXV60 -verify -S -o - +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -triple hexagon %s -target-cpu hexagonv60 -DTEST_HVXV62 -verify -S -o - +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -triple hexagon %s -target-cpu hexagonv60 -DTEST_HVXV65 -verify -S -o - typedef long Vect1024 __attribute__((__vector_size__(128))) __attribute__((aligned(128))); diff --git a/clang/test/Sema/builtins-hvx-v60.c b/clang/test/Sema/builtins-hvx-v60.c index 9a0ec4ff9e59e..46cf76652ca32 100644 --- a/clang/test/Sema/builtins-hvx-v60.c +++ b/clang/test/Sema/builtins-hvx-v60.c @@ -1,7 +1,7 @@ // REQUIRES: hexagon-registered-target -// RUN: %clang_cc1 -triple hexagon %s -target-feature +hvx-length128b -target-feature +hvxv60 -target-cpu hexagonv60 -verify -S -o - -DTEST_HVXV60 -// RUN: %clang_cc1 -triple hexagon %s -target-feature +hvx-length128b -target-feature +hvxv60 -target-cpu hexagonv60 -verify -S -o - -DTEST_HVXV62 -// RUN: %clang_cc1 -triple hexagon %s -target-feature +hvx-length128b -target-feature +hvxv60 -target-cpu hexagonv60 -verify -S -o - -DTEST_HVXV65 +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -triple hexagon %s -target-feature +hvx-length128b -target-feature +hvxv60 -target-cpu hexagonv60 -verify -S -o - -DTEST_HVXV60 +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -triple hexagon %s -target-feature +hvx-length128b -target-feature +hvxv60 -target-cpu hexagonv60 -verify -S -o - -DTEST_HVXV62 +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -triple hexagon %s -target-feature +hvx-length128b -target-feature +hvxv60 -target-cpu hexagonv60 -verify -S -o - -DTEST_HVXV65 typedef long Vect1024 __attribute__((__vector_size__(128))) __attribute__((aligned(128))); diff --git a/clang/test/Sema/builtins-hvx-v62.c b/clang/test/Sema/builtins-hvx-v62.c index 333b29ce974b1..61e07f208c7fb 100644 --- a/clang/test/Sema/builtins-hvx-v62.c +++ b/clang/test/Sema/builtins-hvx-v62.c @@ -1,7 +1,7 @@ // REQUIRES: hexagon-registered-target -// RUN: %clang_cc1 -triple hexagon %s -target-feature +hvx-length128b -target-feature +hvxv62 -target-cpu hexagonv62 -verify -S -o - -DTEST_HVXV60 -// RUN: %clang_cc1 -triple hexagon %s -target-feature +hvx-length128b -target-feature +hvxv62 -target-cpu hexagonv62 -verify -S -o - -DTEST_HVXV62 -// RUN: %clang_cc1 -triple hexagon %s -target-feature +hvx-length128b -target-feature +hvxv62 -target-cpu hexagonv62 -verify -S -o - -DTEST_HVXV65 +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -triple hexagon %s -target-feature +hvx-length128b -target-feature +hvxv62 -target-cpu hexagonv62 -verify -S -o - -DTEST_HVXV60 +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -triple hexagon %s -target-feature +hvx-length128b -target-feature +hvxv62 -target-cpu hexagonv62 -verify -S -o - -DTEST_HVXV62 +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -triple hexagon %s -target-feature +hvx-length128b -target-feature +hvxv62 -target-cpu hexagonv62 -verify -S -o - -DTEST_HVXV65 typedef long Vect1024 __attribute__((__vector_size__(128))) __attribute__((aligned(128))); diff --git a/clang/test/Sema/builtins-hvx-v65.c b/clang/test/Sema/builtins-hvx-v65.c index be6b7b0955d51..f3ce3b4341837 100644 --- a/clang/test/Sema/builtins-hvx-v65.c +++ b/clang/test/Sema/builtins-hvx-v65.c @@ -1,5 +1,5 @@ // REQUIRES: hexagon-registered-target -// RUN: %clang_cc1 -triple hexagon %s -target-feature +hvx-length128b -target-feature +hvxv65 -target-cpu hexagonv65 -fsyntax-only -verify +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -triple hexagon %s -target-feature +hvx-length128b -target-feature +hvxv65 -target-cpu hexagonv65 -fsyntax-only -verify typedef long Vect1024 __attribute__((__vector_size__(128))) __attribute__((aligned(128))); diff --git a/clang/test/Sema/builtins-mips-features.c b/clang/test/Sema/builtins-mips-features.c index 4ea36d7f24dc0..495bf55934c8e 100644 --- a/clang/test/Sema/builtins-mips-features.c +++ b/clang/test/Sema/builtins-mips-features.c @@ -1,5 +1,5 @@ // REQUIRES: mips-registered-target -// RUN: %clang_cc1 -triple mips64 -fsyntax-only -verify %s +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -triple mips64 -fsyntax-only -verify %s typedef signed char v4i8 __attribute__ ((vector_size(4))); typedef signed char v4q7 __attribute__ ((vector_size(4))); diff --git a/clang/test/Sema/builtins-x86.c b/clang/test/Sema/builtins-x86.c index 7d9cdce3d7894..9b2bd148a3777 100644 --- a/clang/test/Sema/builtins-x86.c +++ b/clang/test/Sema/builtins-x86.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple=x86_64-apple-darwin -fsyntax-only -verify %s +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -triple=x86_64-apple-darwin -fsyntax-only -verify %s typedef long long __m128i __attribute__((__vector_size__(16))); typedef float __m128 __attribute__((__vector_size__(16))); diff --git a/clang/test/Sema/constant-builtins-vector.cpp b/clang/test/Sema/constant-builtins-vector.cpp index 2b7d76e36ce96..6b3de8807888d 100644 --- a/clang/test/Sema/constant-builtins-vector.cpp +++ b/clang/test/Sema/constant-builtins-vector.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -std=c++2a -fsyntax-only -Wno-bit-int-extension %s -// RUN: %clang_cc1 -verify -std=c++2a -fsyntax-only -Wno-bit-int-extension -triple ppc64-unknown-linux %s -// RUN: %clang_cc1 -verify -std=c++2a -fsyntax-only -Wno-bit-int-extension -triple ppc64le-unknown-linux %s +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -verify -std=c++2a -fsyntax-only -Wno-bit-int-extension %s +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -verify -std=c++2a -fsyntax-only -Wno-bit-int-extension -triple ppc64-unknown-linux %s +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -verify -std=c++2a -fsyntax-only -Wno-bit-int-extension -triple ppc64le-unknown-linux %s -// RUN: %clang_cc1 -verify -std=c++2a -fsyntax-only -Wno-bit-int-extension %s -fexperimental-new-constant-interpreter -// RUN: %clang_cc1 -verify -std=c++2a -fsyntax-only -Wno-bit-int-extension -triple ppc64-unknown-linux %s -fexperimental-new-constant-interpreter -// RUN: %clang_cc1 -verify -std=c++2a -fsyntax-only -Wno-bit-int-extension -triple ppc64le-unknown-linux %s -fexperimental-new-constant-interpreter +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -verify -std=c++2a -fsyntax-only -Wno-bit-int-extension %s -fexperimental-new-constant-interpreter +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -verify -std=c++2a -fsyntax-only -Wno-bit-int-extension -triple ppc64-unknown-linux %s -fexperimental-new-constant-interpreter +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -verify -std=c++2a -fsyntax-only -Wno-bit-int-extension -triple ppc64le-unknown-linux %s -fexperimental-new-constant-interpreter #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ #define LITTLE_END 1 diff --git a/clang/test/Sema/conversion-64-32.c b/clang/test/Sema/conversion-64-32.c index c172dd109f3be..5fde61724640e 100644 --- a/clang/test/Sema/conversion-64-32.c +++ b/clang/test/Sema/conversion-64-32.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify -Wshorten-64-to-32 -triple x86_64-apple-darwin %s +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -fsyntax-only -verify -Wshorten-64-to-32 -triple x86_64-apple-darwin %s int test0(long v) { return v; // expected-warning {{implicit conversion loses integer precision}} diff --git a/clang/test/Sema/conversion-implicit-int-includes-64-to-32.c b/clang/test/Sema/conversion-implicit-int-includes-64-to-32.c index e22ccbe821f65..925a8aa223782 100644 --- a/clang/test/Sema/conversion-implicit-int-includes-64-to-32.c +++ b/clang/test/Sema/conversion-implicit-int-includes-64-to-32.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify -Wimplicit-int-conversion -triple x86_64-apple-darwin %s +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -fsyntax-only -verify -Wimplicit-int-conversion -triple x86_64-apple-darwin %s int test0(long v) { return v; // expected-warning {{implicit conversion loses integer precision}} diff --git a/clang/test/Sema/ext_vector_ops.c b/clang/test/Sema/ext_vector_ops.c index 5dc3047e145f1..a41b201f88f36 100644 --- a/clang/test/Sema/ext_vector_ops.c +++ b/clang/test/Sema/ext_vector_ops.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 %s -verify -fsyntax-only -Wvector-conversion -triple x86_64-apple-darwin10 +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all %s -verify -fsyntax-only -Wvector-conversion -triple x86_64-apple-darwin10 typedef unsigned int v2u __attribute__ ((ext_vector_type(2))); typedef int v2s __attribute__ ((ext_vector_type(2))); diff --git a/clang/test/Sema/overload-arm-mve.c b/clang/test/Sema/overload-arm-mve.c index b419ba3c3203e..04c743b389085 100644 --- a/clang/test/Sema/overload-arm-mve.c +++ b/clang/test/Sema/overload-arm-mve.c @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -triple thumbv8.1m.main-none-none-eabi -target-feature +mve.fp -flax-vector-conversions=all -Werror -emit-llvm -o - %s | FileCheck %s -// RUN: %clang_cc1 -triple thumbv8.1m.main-none-none-eabi -target-feature +mve.fp -flax-vector-conversions=all -verify -fsyntax-only -DERROR_CHECK %s +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -triple thumbv8.1m.main-none-none-eabi -target-feature +mve.fp -flax-vector-conversions=all -Werror -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -triple thumbv8.1m.main-none-none-eabi -target-feature +mve.fp -flax-vector-conversions=all -verify -fsyntax-only -DERROR_CHECK %s typedef signed short int16_t; typedef signed int int32_t; diff --git a/clang/test/Sema/vector-assign.c b/clang/test/Sema/vector-assign.c index d7972ed8b4c7b..f38b831ad5b93 100644 --- a/clang/test/Sema/vector-assign.c +++ b/clang/test/Sema/vector-assign.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 %s -verify -fsyntax-only -Wvector-conversion +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all %s -verify -fsyntax-only -Wvector-conversion typedef unsigned int v2u __attribute__ ((vector_size (8))); typedef signed int v2s __attribute__ ((vector_size (8))); typedef signed int v1s __attribute__ ((vector_size (4))); diff --git a/clang/test/Sema/vector-cast.c b/clang/test/Sema/vector-cast.c index c4502d2adf2eb..483b79f9db183 100644 --- a/clang/test/Sema/vector-cast.c +++ b/clang/test/Sema/vector-cast.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only %s -verify -Wvector-conversion +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -fsyntax-only %s -verify -Wvector-conversion typedef long long t1 __attribute__ ((vector_size (8))); typedef char t2 __attribute__ ((vector_size (16))); diff --git a/clang/test/Sema/vector-gcc-compat.c b/clang/test/Sema/vector-gcc-compat.c index 6bb2c5168457c..b6cdbfff598e8 100644 --- a/clang/test/Sema/vector-gcc-compat.c +++ b/clang/test/Sema/vector-gcc-compat.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 %s -verify -fsyntax-only -Weverything -Wno-unused-but-set-variable -triple x86_64-apple-darwin10 +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all %s -verify -fsyntax-only -Weverything -Wno-unused-but-set-variable -triple x86_64-apple-darwin10 // Test the compatibility of clang's vector extensions with gcc's vector // extensions for C. Notably &&, ||, ?: and ! are not available. diff --git a/clang/test/Sema/vector-gcc-compat.cpp b/clang/test/Sema/vector-gcc-compat.cpp index 42c24d91ea8f3..e208093d13fb2 100644 --- a/clang/test/Sema/vector-gcc-compat.cpp +++ b/clang/test/Sema/vector-gcc-compat.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 %s -verify -fsyntax-only -Weverything -Wno-unused-but-set-variable -std=c++11 -triple x86_64-apple-darwin10 +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all %s -verify -fsyntax-only -Weverything -Wno-unused-but-set-variable -std=c++11 -triple x86_64-apple-darwin10 // Test the compatibility of clang++'s vector extensions with g++'s vector // extensions. In comparison to the extensions available in C, the !, ?:, && and diff --git a/clang/test/Sema/vector-init.c b/clang/test/Sema/vector-init.c index 81965a3768e9f..e6d8a6e856e6b 100644 --- a/clang/test/Sema/vector-init.c +++ b/clang/test/Sema/vector-init.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 %s -fsyntax-only -verify +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all %s -fsyntax-only -verify //typedef __attribute__(( ext_vector_type(4) )) float float4; typedef float float4 __attribute__((vector_size(16))); diff --git a/clang/test/Sema/vector-ops.c b/clang/test/Sema/vector-ops.c index 575f38b972f5e..2b631e02bec0a 100644 --- a/clang/test/Sema/vector-ops.c +++ b/clang/test/Sema/vector-ops.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 %s -verify -fsyntax-only -Wvector-conversion -triple x86_64-apple-darwin10 +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all %s -verify -fsyntax-only -Wvector-conversion -triple x86_64-apple-darwin10 typedef unsigned int v2u __attribute__ ((vector_size (8))); typedef int v2s __attribute__ ((vector_size (8))); typedef float v2f __attribute__ ((vector_size(8))); diff --git a/clang/test/SemaCXX/attr-arm-sve-vector-bits.cpp b/clang/test/SemaCXX/attr-arm-sve-vector-bits.cpp index 1127f31619e77..8d3d793de089b 100644 --- a/clang/test/SemaCXX/attr-arm-sve-vector-bits.cpp +++ b/clang/test/SemaCXX/attr-arm-sve-vector-bits.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -target-feature +bf16 -ffreestanding -fsyntax-only -verify -std=c++11 -mvscale-min=4 -mvscale-max=4 -Wconversion %s +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -triple aarch64-none-linux-gnu -target-feature +sve -target-feature +bf16 -ffreestanding -fsyntax-only -verify -std=c++11 -mvscale-min=4 -mvscale-max=4 -Wconversion %s // expected-no-diagnostics #include <stdint.h> diff --git a/clang/test/SemaCXX/attr-riscv-rvv-vector-bits.cpp b/clang/test/SemaCXX/attr-riscv-rvv-vector-bits.cpp index 6d18883b46fe2..0d52d35ad705b 100644 --- a/clang/test/SemaCXX/attr-riscv-rvv-vector-bits.cpp +++ b/clang/test/SemaCXX/attr-riscv-rvv-vector-bits.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple riscv64-none-linux-gnu -target-feature +zve64x -ffreestanding -fsyntax-only -verify -std=c++11 -mvscale-min=4 -mvscale-max=4 -Wconversion %s +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -triple riscv64-none-linux-gnu -target-feature +zve64x -ffreestanding -fsyntax-only -verify -std=c++11 -mvscale-min=4 -mvscale-max=4 -Wconversion %s // expected-no-diagnostics #include <stdint.h> diff --git a/clang/test/SemaCXX/vector.cpp b/clang/test/SemaCXX/vector.cpp index 808bdb679b09c..d051e37816f45 100644 --- a/clang/test/SemaCXX/vector.cpp +++ b/clang/test/SemaCXX/vector.cpp @@ -1,9 +1,9 @@ -// RUN: %clang_cc1 -flax-vector-conversions=all -triple x86_64-apple-darwin10 -fsyntax-only -verify %s -// RUN: %clang_cc1 -flax-vector-conversions=all -triple x86_64-apple-darwin10 -fsyntax-only -verify -std=c++98 %s -// RUN: %clang_cc1 -flax-vector-conversions=all -triple x86_64-apple-darwin10 -fsyntax-only -verify -std=c++11 %s -// RUN: %clang_cc1 -flax-vector-conversions=all -triple x86_64-apple-darwin10 -fsyntax-only -verify -std=c++20 %s -// RUN: %clang_cc1 -flax-vector-conversions=integer -triple x86_64-apple-darwin10 -fsyntax-only -verify %s -DNO_LAX_FLOAT -// RUN: %clang_cc1 -flax-vector-conversions=none -triple x86_64-apple-darwin10 -fsyntax-only -verify %s -DNO_LAX_FLOAT -DNO_LAX_INT +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -flax-vector-conversions=all -triple x86_64-apple-darwin10 -fsyntax-only -verify %s +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -flax-vector-conversions=all -triple x86_64-apple-darwin10 -fsyntax-only -verify -std=c++98 %s +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -flax-vector-conversions=all -triple x86_64-apple-darwin10 -fsyntax-only -verify -std=c++11 %s +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -flax-vector-conversions=all -triple x86_64-apple-darwin10 -fsyntax-only -verify -std=c++20 %s +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -flax-vector-conversions=integer -triple x86_64-apple-darwin10 -fsyntax-only -verify %s -DNO_LAX_FLOAT +// RUN: %clang_cc1 -Wno-deprecate-lax-vec-conv-all -flax-vector-conversions=none -triple x86_64-apple-darwin10 -fsyntax-only -verify %s -DNO_LAX_FLOAT -DNO_LAX_INT typedef char char16 __attribute__ ((__vector_size__ (16))); typedef long long longlong16 __attribute__ ((__vector_size__ (16))); From 2fd4edb95c11177efe560f606ec1f858b98fc6e9 Mon Sep 17 00:00:00 2001 From: "Pirog, Mikolaj Maciej" <mikolaj.maciej.pi...@intel.com> Date: Thu, 21 Aug 2025 15:39:35 +0200 Subject: [PATCH 2/2] Disable warning in the simd_unary.pass.cpp --- .../std/experimental/simd/simd.class/simd_unary.pass.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libcxx/test/std/experimental/simd/simd.class/simd_unary.pass.cpp b/libcxx/test/std/experimental/simd/simd.class/simd_unary.pass.cpp index 056d6f65fc368..444e0939b2cdf 100644 --- a/libcxx/test/std/experimental/simd/simd.class/simd_unary.pass.cpp +++ b/libcxx/test/std/experimental/simd/simd.class/simd_unary.pass.cpp @@ -24,9 +24,16 @@ // simd operator+() const noexcept; // simd operator-() const noexcept; +#include "test_macros.h" + +TEST_DIAGNOSTIC_PUSH +TEST_CLANG_DIAGNOSTIC_IGNORED("-Wdeprecate-lax-vec-conv-all") + #include "../test_utils.h" #include <experimental/simd> +TEST_DIAGNOSTIC_POP + namespace ex = std::experimental::parallelism_v2; template <class T, std::size_t> @@ -111,6 +118,7 @@ struct CheckSimdNegationOperator { } }; + template <class T, std::size_t> struct CheckSimdBitwiseNotOperator { template <class SimdAbi> _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits