Skip to content

Commit 49c4e58

Browse files
committed
For PR17164: split -fno-lax-vector-conversion into three different
levels: -- none: no lax vector conversions [new GCC default] -- integer: only conversions between integer vectors [old GCC default] -- all: all conversions between same-size vectors [Clang default] For now, Clang still defaults to "all" mode, but per my proposal on cfe-dev (2019-04-10) the default will be changed to "integer" as soon as that doesn't break lots of testcases. (Eventually I'd like to change the default to "none" to match GCC and general sanity.) Following GCC's behavior, the driver flag -flax-vector-conversions is translated to -flax-vector-conversions=integer. llvm-svn: 371805
1 parent 51ead00 commit 49c4e58

30 files changed

+142
-60
lines changed

clang/include/clang/Basic/LangOptions.def

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ LANGOPT(AppleKext , 1, 0, "Apple kext support")
119119
BENIGN_LANGOPT(PascalStrings, 1, 0, "Pascal string support")
120120
LANGOPT(WritableStrings , 1, 0, "writable string support")
121121
LANGOPT(ConstStrings , 1, 0, "const-qualified string support")
122-
LANGOPT(LaxVectorConversions , 1, 1, "lax vector conversions")
122+
ENUM_LANGOPT(LaxVectorConversions, LaxVectorConversionKind, 2,
123+
LaxVectorConversionKind::All, "lax vector conversions")
123124
LANGOPT(AltiVec , 1, 0, "AltiVec-style vector initializers")
124125
LANGOPT(ZVector , 1, 0, "System z vector extensions")
125126
LANGOPT(Exceptions , 1, 0, "exception handling")

clang/include/clang/Basic/LangOptions.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,16 @@ class LangOptions : public LangOptionsBase {
184184
FEA_On
185185
};
186186

187+
enum class LaxVectorConversionKind {
188+
/// Permit no implicit vector bitcasts.
189+
None,
190+
/// Permit vector bitcasts between integer vectors with different numbers
191+
/// of elements but the same total bit-width.
192+
Integer,
193+
/// Permit vector bitcasts between all vectors with the same total
194+
/// bit-width.
195+
All,
196+
};
187197

188198
public:
189199
/// Set of enabled sanitizers.

clang/include/clang/Driver/Options.td

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1274,7 +1274,10 @@ def fno_fine_grained_bitfield_accesses : Flag<["-"],
12741274
HelpText<"Use large-integer access for consecutive bitfield runs.">;
12751275

12761276
def flat__namespace : Flag<["-"], "flat_namespace">;
1277-
def flax_vector_conversions : Flag<["-"], "flax-vector-conversions">, Group<f_Group>;
1277+
def flax_vector_conversions_EQ : Joined<["-"], "flax-vector-conversions=">, Group<f_Group>,
1278+
HelpText<"Enable implicit vector bit-casts">, Values<"none,integer,all">, Flags<[CC1Option]>;
1279+
def flax_vector_conversions : Flag<["-"], "flax-vector-conversions">, Group<f_Group>,
1280+
Alias<flax_vector_conversions_EQ>, AliasArgs<["integer"]>;
12781281
def flimited_precision_EQ : Joined<["-"], "flimited-precision=">, Group<f_Group>;
12791282
def fapple_link_rtlib : Flag<["-"], "fapple-link-rtlib">, Group<f_Group>,
12801283
HelpText<"Force linking the clang builtins runtime library">;
@@ -1448,7 +1451,7 @@ def fno_experimental_new_pass_manager : Flag<["-"], "fno-experimental-new-pass-m
14481451
def fveclib : Joined<["-"], "fveclib=">, Group<f_Group>, Flags<[CC1Option]>,
14491452
HelpText<"Use the given vector functions library">, Values<"Accelerate,MASSV,SVML,none">;
14501453
def fno_lax_vector_conversions : Flag<["-"], "fno-lax-vector-conversions">, Group<f_Group>,
1451-
HelpText<"Disallow implicit conversions between vectors with a different number of elements or different element types">, Flags<[CC1Option]>;
1454+
Alias<flax_vector_conversions_EQ>, AliasArgs<["none"]>;
14521455
def fno_merge_all_constants : Flag<["-"], "fno-merge-all-constants">, Group<f_Group>,
14531456
HelpText<"Disallow merging of constants">;
14541457
def fno_modules : Flag <["-"], "fno-modules">, Group<f_Group>,

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4678,15 +4678,11 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
46784678
if (TC.SupportsProfiling())
46794679
Args.AddLastArg(CmdArgs, options::OPT_mfentry);
46804680

4681-
// -flax-vector-conversions is default.
4682-
if (!Args.hasFlag(options::OPT_flax_vector_conversions,
4683-
options::OPT_fno_lax_vector_conversions))
4684-
CmdArgs.push_back("-fno-lax-vector-conversions");
4685-
46864681
if (Args.getLastArg(options::OPT_fapple_kext) ||
46874682
(Args.hasArg(options::OPT_mkernel) && types::isCXX(InputType)))
46884683
CmdArgs.push_back("-fapple-kext");
46894684

4685+
Args.AddLastArg(CmdArgs, options::OPT_flax_vector_conversions_EQ);
46904686
Args.AddLastArg(CmdArgs, options::OPT_fobjc_sender_dependent_dispatch);
46914687
Args.AddLastArg(CmdArgs, options::OPT_fdiagnostics_print_source_range_info);
46924688
Args.AddLastArg(CmdArgs, options::OPT_fdiagnostics_parseable_fixits);

clang/lib/Frontend/CompilerInvocation.cpp

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2265,7 +2265,7 @@ void CompilerInvocation::setLangDefaults(LangOptions &Opts, InputKind IK,
22652265
if (Opts.OpenCL) {
22662266
Opts.AltiVec = 0;
22672267
Opts.ZVector = 0;
2268-
Opts.LaxVectorConversions = 0;
2268+
Opts.setLaxVectorConversions(LangOptions::LaxVectorConversionKind::None);
22692269
Opts.setDefaultFPContractMode(LangOptions::FPC_On);
22702270
Opts.NativeHalfType = 1;
22712271
Opts.NativeHalfArgsAndReturns = 1;
@@ -2667,8 +2667,18 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK,
26672667
Opts.WritableStrings = Args.hasArg(OPT_fwritable_strings);
26682668
Opts.ConstStrings = Args.hasFlag(OPT_fconst_strings, OPT_fno_const_strings,
26692669
Opts.ConstStrings);
2670-
if (Args.hasArg(OPT_fno_lax_vector_conversions))
2671-
Opts.LaxVectorConversions = 0;
2670+
if (Arg *A = Args.getLastArg(OPT_flax_vector_conversions_EQ)) {
2671+
using LaxKind = LangOptions::LaxVectorConversionKind;
2672+
if (auto Kind = llvm::StringSwitch<Optional<LaxKind>>(A->getValue())
2673+
.Case("none", LaxKind::None)
2674+
.Case("integer", LaxKind::Integer)
2675+
.Case("all", LaxKind::All)
2676+
.Default(llvm::None))
2677+
Opts.setLaxVectorConversions(*Kind);
2678+
else
2679+
Diags.Report(diag::err_drv_invalid_value)
2680+
<< A->getAsString(Args) << A->getValue();
2681+
}
26722682
if (Args.hasArg(OPT_fno_threadsafe_statics))
26732683
Opts.ThreadsafeStatics = 0;
26742684
Opts.Exceptions = Args.hasArg(OPT_fexceptions);

clang/lib/Sema/SemaExpr.cpp

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6498,8 +6498,28 @@ bool Sema::areLaxCompatibleVectorTypes(QualType srcTy, QualType destTy) {
64986498
bool Sema::isLaxVectorConversion(QualType srcTy, QualType destTy) {
64996499
assert(destTy->isVectorType() || srcTy->isVectorType());
65006500

6501-
if (!Context.getLangOpts().LaxVectorConversions)
6501+
switch (Context.getLangOpts().getLaxVectorConversions()) {
6502+
case LangOptions::LaxVectorConversionKind::None:
65026503
return false;
6504+
6505+
case LangOptions::LaxVectorConversionKind::Integer:
6506+
if (!srcTy->isIntegralOrEnumerationType()) {
6507+
auto *Vec = srcTy->getAs<VectorType>();
6508+
if (!Vec || !Vec->getElementType()->isIntegralOrEnumerationType())
6509+
return false;
6510+
}
6511+
if (!destTy->isIntegralOrEnumerationType()) {
6512+
auto *Vec = destTy->getAs<VectorType>();
6513+
if (!Vec || !Vec->getElementType()->isIntegralOrEnumerationType())
6514+
return false;
6515+
}
6516+
// OK, integer (vector) -> integer (vector) bitcast.
6517+
break;
6518+
6519+
case LangOptions::LaxVectorConversionKind::All:
6520+
break;
6521+
}
6522+
65036523
return areLaxCompatibleVectorTypes(srcTy, destTy);
65046524
}
65056525

clang/test/CodeGen/builtins-systemz-vector.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// REQUIRES: systemz-registered-target
2-
// RUN: %clang_cc1 -target-cpu z13 -triple s390x-ibm-linux -fno-lax-vector-conversions \
2+
// RUN: %clang_cc1 -target-cpu z13 -triple s390x-ibm-linux -flax-vector-conversions=none \
33
// RUN: -Wall -Wno-unused -Werror -emit-llvm %s -o - | FileCheck %s
44

55
typedef __attribute__((vector_size(16))) signed char vec_schar;

clang/test/CodeGen/builtins-systemz-vector2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// REQUIRES: systemz-registered-target
2-
// RUN: %clang_cc1 -target-cpu z14 -triple s390x-ibm-linux -fno-lax-vector-conversions \
2+
// RUN: %clang_cc1 -target-cpu z14 -triple s390x-ibm-linux -flax-vector-conversions=none \
33
// RUN: -Wall -Wno-unused -Werror -emit-llvm %s -o - | FileCheck %s
44

55
typedef __attribute__((vector_size(16))) signed char vec_schar;

clang/test/CodeGen/builtins-systemz-vector3.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// REQUIRES: systemz-registered-target
2-
// RUN: %clang_cc1 -target-cpu arch13 -triple s390x-ibm-linux -fno-lax-vector-conversions \
2+
// RUN: %clang_cc1 -target-cpu arch13 -triple s390x-ibm-linux -flax-vector-conversions=none \
33
// RUN: -Wall -Wno-unused -Werror -emit-llvm %s -o - | FileCheck %s
44

55
typedef __attribute__((vector_size(16))) signed char vec_schar;

clang/test/CodeGen/builtins-systemz-zvector-error.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// REQUIRES: systemz-registered-target
22
// RUN: %clang_cc1 -target-cpu z13 -triple s390x-linux-gnu \
3-
// RUN: -fzvector -fno-lax-vector-conversions \
3+
// RUN: -fzvector -flax-vector-conversions=none \
44
// RUN: -Wall -Wno-unused -Werror -fsyntax-only -verify %s
55

66
#include <vecintrin.h>

clang/test/CodeGen/builtins-systemz-zvector.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// REQUIRES: systemz-registered-target
22
// RUN: %clang_cc1 -target-cpu z13 -triple s390x-linux-gnu \
3-
// RUN: -O -fzvector -fno-lax-vector-conversions \
3+
// RUN: -O -fzvector -flax-vector-conversions=none \
44
// RUN: -Wall -Wno-unused -Werror -emit-llvm %s -o - | FileCheck %s
55
// RUN: %clang_cc1 -target-cpu z13 -triple s390x-linux-gnu \
6-
// RUN: -O -fzvector -fno-lax-vector-conversions \
6+
// RUN: -O -fzvector -flax-vector-conversions=none \
77
// RUN: -Wall -Wno-unused -Werror -S %s -o - | FileCheck %s --check-prefix=CHECK-ASM
88

99
#include <vecintrin.h>

clang/test/CodeGen/builtins-systemz-zvector2-error.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// REQUIRES: systemz-registered-target
22
// RUN: %clang_cc1 -target-cpu z14 -triple s390x-linux-gnu \
3-
// RUN: -fzvector -fno-lax-vector-conversions \
3+
// RUN: -fzvector -flax-vector-conversions=none \
44
// RUN: -Wall -Wno-unused -Werror -fsyntax-only -verify %s
55

66
#include <vecintrin.h>

clang/test/CodeGen/builtins-systemz-zvector2.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// REQUIRES: systemz-registered-target
22
// RUN: %clang_cc1 -target-cpu z14 -triple s390x-linux-gnu \
3-
// RUN: -O -fzvector -fno-lax-vector-conversions \
3+
// RUN: -O -fzvector -flax-vector-conversions=none \
44
// RUN: -Wall -Wno-unused -Werror -emit-llvm %s -o - | FileCheck %s
55
// RUN: %clang_cc1 -target-cpu z14 -triple s390x-linux-gnu \
6-
// RUN: -O -fzvector -fno-lax-vector-conversions \
6+
// RUN: -O -fzvector -flax-vector-conversions=none \
77
// RUN: -Wall -Wno-unused -Werror -S %s -o - | FileCheck %s --check-prefix=CHECK-ASM
88

99
#include <vecintrin.h>

clang/test/CodeGen/builtins-systemz-zvector3-error.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// REQUIRES: systemz-registered-target
22
// RUN: %clang_cc1 -target-cpu arch13 -triple s390x-linux-gnu \
3-
// RUN: -fzvector -fno-lax-vector-conversions \
3+
// RUN: -fzvector -flax-vector-conversions=none \
44
// RUN: -Wall -Wno-unused -Werror -fsyntax-only -verify %s
55

66
#include <vecintrin.h>

clang/test/CodeGen/builtins-systemz-zvector3.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// REQUIRES: systemz-registered-target
22
// RUN: %clang_cc1 -target-cpu arch13 -triple s390x-linux-gnu \
3-
// RUN: -O -fzvector -fno-lax-vector-conversions \
3+
// RUN: -O -fzvector -flax-vector-conversions=none \
44
// RUN: -Wall -Wno-unused -Werror -emit-llvm %s -o - | FileCheck %s
55
// RUN: %clang_cc1 -target-cpu arch13 -triple s390x-linux-gnu \
6-
// RUN: -O -fzvector -fno-lax-vector-conversions \
6+
// RUN: -O -fzvector -flax-vector-conversions=none \
77
// RUN: -Wall -Wno-unused -Werror -S %s -o - | FileCheck %s --check-prefix=CHECK-ASM
88

99
#include <vecintrin.h>

clang/test/CodeGen/builtins-wasm.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// RUN: %clang_cc1 -triple wasm32-unknown-unknown -target-feature +unimplemented-simd128 -target-feature +nontrapping-fptoint -target-feature +exception-handling -target-feature +bulk-memory -fno-lax-vector-conversions -O3 -emit-llvm -o - %s | FileCheck %s -check-prefixes WEBASSEMBLY,WEBASSEMBLY32
2-
// RUN: %clang_cc1 -triple wasm64-unknown-unknown -target-feature +unimplemented-simd128 -target-feature +nontrapping-fptoint -target-feature +exception-handling -target-feature +bulk-memory -fno-lax-vector-conversions -O3 -emit-llvm -o - %s | FileCheck %s -check-prefixes WEBASSEMBLY,WEBASSEMBLY64
3-
// RUN: not %clang_cc1 -triple wasm64-unknown-unknown -target-feature +nontrapping-fptoint -target-feature +exception-handling -target-feature +bulk-memory -fno-lax-vector-conversions -O3 -emit-llvm -o - %s 2>&1 | FileCheck %s -check-prefixes MISSING-SIMD
1+
// RUN: %clang_cc1 -triple wasm32-unknown-unknown -target-feature +unimplemented-simd128 -target-feature +nontrapping-fptoint -target-feature +exception-handling -target-feature +bulk-memory -flax-vector-conversions=none -O3 -emit-llvm -o - %s | FileCheck %s -check-prefixes WEBASSEMBLY,WEBASSEMBLY32
2+
// RUN: %clang_cc1 -triple wasm64-unknown-unknown -target-feature +unimplemented-simd128 -target-feature +nontrapping-fptoint -target-feature +exception-handling -target-feature +bulk-memory -flax-vector-conversions=none -O3 -emit-llvm -o - %s | FileCheck %s -check-prefixes WEBASSEMBLY,WEBASSEMBLY64
3+
// RUN: not %clang_cc1 -triple wasm64-unknown-unknown -target-feature +nontrapping-fptoint -target-feature +exception-handling -target-feature +bulk-memory -flax-vector-conversions=none -O3 -emit-llvm -o - %s 2>&1 | FileCheck %s -check-prefixes MISSING-SIMD
44

55
// SIMD convenience types
66
typedef char i8x16 __attribute((vector_size(16)));

clang/test/CodeGenCXX/builtins-systemz-zvector.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// REQUIRES: systemz-registered-target
22
// RUN: %clang_cc1 -target-cpu z13 -triple s390x-linux-gnu \
3-
// RUN: -fzvector -fno-lax-vector-conversions -std=c++11 \
3+
// RUN: -fzvector -flax-vector-conversions=none -std=c++11 \
44
// RUN: -Wall -Wno-unused -Werror -emit-llvm %s -o - | FileCheck %s
55

66
bool gb;

clang/test/Headers/altivec-header.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clang_cc1 -triple powerpc64-unknown-unknown -target-feature +altivec -ffreestanding -emit-llvm -o - %s | FileCheck %s
2-
// RUN: %clang_cc1 -triple powerpc64-unknown-unknown -target-feature +altivec -ffreestanding -emit-llvm -fno-lax-vector-conversions -o - %s | FileCheck %s
2+
// RUN: %clang_cc1 -triple powerpc64-unknown-unknown -target-feature +altivec -ffreestanding -emit-llvm -flax-vector-conversions=none -o - %s | FileCheck %s
33
// RUN: %clang_cc1 -triple powerpc64-unknown-unknown -target-feature +altivec -ffreestanding -emit-llvm -x c++ -o - %s | FileCheck %s
44

55
#include <altivec.h>

clang/test/Headers/arm-neon-header.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clang_cc1 -triple thumbv7-apple-darwin10 -target-cpu cortex-a8 -fsyntax-only -Wvector-conversions -ffreestanding %s
2-
// RUN: %clang_cc1 -triple thumbv7-apple-darwin10 -target-cpu cortex-a8 -fsyntax-only -fno-lax-vector-conversions -ffreestanding %s
2+
// RUN: %clang_cc1 -triple thumbv7-apple-darwin10 -target-cpu cortex-a8 -fsyntax-only -flax-vector-conversions=none -ffreestanding %s
33
// RUN: %clang_cc1 -x c++ -triple thumbv7-apple-darwin10 -target-cpu cortex-a8 -fsyntax-only -Wvector-conversions -ffreestanding %s
44

55
// RUN: %clang -fsyntax-only -ffreestanding --target=aarch64-none-eabi -march=armv8.2-a+fp16 -std=c89 -xc %s

clang/test/Headers/x86-intrinsics-headers-clean.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Make sure the intrinsic headers compile cleanly with no warnings or errors.
22

33
// RUN: %clang_cc1 -ffreestanding -triple x86_64-unknown-unknown -Wsystem-headers \
4-
// RUN: -fsyntax-only -fno-lax-vector-conversions -x c++ -verify %s
4+
// RUN: -fsyntax-only -flax-vector-conversions=none -x c++ -verify %s
55

66
// expected-no-diagnostics
77

clang/test/Headers/x86-intrinsics-headers.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clang_cc1 -fsyntax-only -ffreestanding %s
2-
// RUN: %clang_cc1 -fsyntax-only -ffreestanding -fno-lax-vector-conversions %s
2+
// RUN: %clang_cc1 -fsyntax-only -ffreestanding -flax-vector-conversions=none %s
33
// RUN: %clang_cc1 -fsyntax-only -ffreestanding -x c++ %s
44

55
#if defined(i386) || defined(__x86_64__)

clang/test/Headers/x86intrin-2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clang_cc1 -fsyntax-only -ffreestanding %s -verify
2-
// RUN: %clang_cc1 -fsyntax-only -ffreestanding -fno-lax-vector-conversions %s -verify
2+
// RUN: %clang_cc1 -fsyntax-only -ffreestanding -flax-vector-conversions=none %s -verify
33
// RUN: %clang_cc1 -fsyntax-only -ffreestanding -x c++ %s -verify
44
// expected-no-diagnostics
55

clang/test/Headers/x86intrin.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clang_cc1 -fsyntax-only -ffreestanding %s -verify
2-
// RUN: %clang_cc1 -fsyntax-only -ffreestanding -fno-lax-vector-conversions %s -verify
2+
// RUN: %clang_cc1 -fsyntax-only -ffreestanding -flax-vector-conversions=none %s -verify
33
// RUN: %clang_cc1 -fsyntax-only -ffreestanding -x c++ %s -verify
44
// expected-no-diagnostics
55

clang/test/Sema/ext_vector_casts.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -fsyntax-only -verify -fno-lax-vector-conversions -Wconversion %s
1+
// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -fsyntax-only -verify -flax-vector-conversions=none -Wconversion %s
22

33
typedef __attribute__((ext_vector_type(8))) _Bool BoolVector; // expected-error {{invalid vector element type '_Bool'}}
44

clang/test/Sema/typedef-retain.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -fsyntax-only -verify %s -fno-lax-vector-conversions
1+
// RUN: %clang_cc1 -fsyntax-only -verify %s -flax-vector-conversions=none
22

33
typedef float float4 __attribute__((vector_size(16)));
44
typedef int int4 __attribute__((vector_size(16)));

clang/test/Sema/zvector.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clang_cc1 -triple s390x-linux-gnu -fzvector \
2-
// RUN: -fno-lax-vector-conversions -W -Wall -Wconversion \
2+
// RUN: -flax-vector-conversions=none -W -Wall -Wconversion \
33
// RUN: -Werror -fsyntax-only -verify %s
44

55
vector signed char sc, sc2;

clang/test/Sema/zvector2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clang_cc1 -triple s390x-linux-gnu -fzvector -target-cpu z14 \
2-
// RUN: -fno-lax-vector-conversions -W -Wall -Wconversion \
2+
// RUN: -flax-vector-conversions=none -W -Wall -Wconversion \
33
// RUN: -Werror -fsyntax-only -verify %s
44

55
vector signed char sc, sc2;

clang/test/SemaCXX/altivec.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -target-feature +altivec -fno-lax-vector-conversions -triple powerpc-unknown-unknown -fcxx-exceptions -verify %s
1+
// RUN: %clang_cc1 -target-feature +altivec -flax-vector-conversions=none -triple powerpc-unknown-unknown -fcxx-exceptions -verify %s
22

33
typedef int V4i __attribute__((vector_size(16)));
44

clang/test/SemaCXX/vector-no-lax.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -fno-lax-vector-conversions -verify %s
1+
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -flax-vector-conversions=none -verify %s
22
typedef unsigned int __attribute__((vector_size (16))) vUInt32;
33
typedef int __attribute__((vector_size (16))) vSInt32;
44

0 commit comments

Comments
 (0)