llvm-project/clang/lib/AST
Joe Ellis 23a96b84a8 [AArch64][SVE] Support implicit lax vector conversions for SVE types
Lax vector conversions was behaving incorrectly for implicit casts
between scalable and fixed-length vector types. For example, this:

    #include <arm_sve.h>

    #define N __ARM_FEATURE_SVE_BITS
    #define FIXED_ATTR __attribute__((arm_sve_vector_bits(N)))

    typedef svfloat32_t fixed_float32_t FIXED_ATTR;

    void allowed_depending() {
      fixed_float32_t fs32;
      svfloat64_t s64;

      fs32 = s64;
    }

... would fail because the vectors have differing lane sizes. This patch
implements the correct behaviour for
-flax-vector-conversions={none,all,integer}. Specifically:

- -flax-vector-conversions=none prevents all lax vector conversions
  between scalable and fixed-sized vectors.
- -flax-vector-conversions=integer allows lax vector conversions between
  scalable and fixed-size vectors whose element types are integers.
- -flax-vector-conversions=all allows all lax vector conversions between
  scalable and fixed-size vectors (including those with floating point
  element types).

The implicit conversions are implemented as bitcasts.

Reviewed By: fpetrogalli

Differential Revision: https://reviews.llvm.org/D91067
2020-11-17 14:50:17 +00:00
..
Interp [clang][NFC] Use SmallString instead of SmallVector<char 2020-11-17 13:02:58 +00:00
APValue.cpp Add PrintingPolicy overload to APValue::printPretty. NFC. 2020-11-10 14:48:56 -08:00
ASTConcept.cpp [Concepts] Transform constraints of non-template functions to ConstantEvaluated 2020-01-25 23:00:24 +02:00
ASTConsumer.cpp
ASTContext.cpp [AArch64][SVE] Support implicit lax vector conversions for SVE types 2020-11-17 14:50:17 +00:00
ASTDiagnostic.cpp [c++20] For P0732R2 / P1907R1: Basic frontend support for class types as 2020-10-21 13:21:41 -07:00
ASTDumper.cpp Undo Revert "Ignore template instantiations if not in AsIs mode" 2020-11-03 13:59:01 -08:00
ASTImporter.cpp Rename CXXUnresolvedConstructExpr::arg_size for consistency 2020-11-02 20:21:48 +00:00
ASTImporterLookupTable.cpp [ASTImporter] Add Visitor for TypedefNameDecl's 2020-07-28 11:52:29 -05:00
ASTStructuralEquivalence.cpp [ASTImporter][AST] Fix structural equivalency crash on dependent FieldDecl 2020-10-05 14:06:09 +02:00
ASTTypeTraits.cpp [clang] Allow DynTypedNode to store a TemplateArgumentLoc 2020-08-10 03:09:18 -04:00
AttrImpl.cpp [OPENMP]Fix PR47158, case 3: allow devic_typein nested declare target region. 2020-08-24 09:58:37 -04:00
CMakeLists.txt [Ignore Expressions] Fix performance regression by inlining `Ignore*SingleStep` 2020-09-09 07:32:40 +00:00
CXXABI.h
CXXInheritance.cpp Remove unused parameter from CXXRecordDecl::forallBases [NFC] 2020-02-29 14:23:44 +01:00
Comment.cpp Fix "pointer is null" static analyzer warning. NFCI. 2020-01-07 13:41:52 +00:00
CommentBriefParser.cpp
CommentCommandTraits.cpp Explicitly include <cassert> when using assert 2020-03-02 22:45:28 +01:00
CommentLexer.cpp [clang][NFC] Rearrange Comment Token and Lexer fields to reduce padding 2020-10-27 00:03:43 +00:00
CommentParser.cpp Adds a warning when an inline Doxygen comment has no argument 2019-08-05 08:05:16 +00:00
CommentSema.cpp [AST] Remove DeclCXX.h dep on ASTContext.h 2020-04-06 10:09:01 -07:00
ComparisonCategories.cpp Revert "Revert "Ensure that checkInitIsICE is called exactly once for every variable"" 2020-10-26 12:08:57 -07:00
ComputeDependence.cpp PR47175: Ensure type-dependent function-style casts have dependent 2020-10-08 17:00:22 -07:00
DataCollection.cpp Avoid SourceManager.h include in RawCommentList.h, add missing incs 2020-02-27 13:49:40 -08:00
Decl.cpp Convert ConstexprKind from Specifiers.h to a scoped enum; NFC 2020-11-16 14:10:19 -05:00
DeclBase.cpp [c++20] For P0732R2 / P1907R1: Basic frontend support for class types as 2020-10-21 13:21:41 -07:00
DeclCXX.cpp Convert ConstexprKind from Specifiers.h to a scoped enum; NFC 2020-11-16 14:10:19 -05:00
DeclFriend.cpp
DeclGroup.cpp
DeclObjC.cpp [AST] Fix crashes caused by redeclarations in hidden prototypes 2020-10-08 19:48:36 -07:00
DeclOpenMP.cpp [OPENMP]Redesign of OMPExecutableDirective/OMPDeclarativeDirective representation. 2020-08-06 12:25:19 -04:00
DeclPrinter.cpp [clang][NFC] DeclPrinter: use NamedDecl::getDeclName instead of NamedDecl::printName to print the name of enumerations, namespaces and template parameters. 2020-08-05 13:54:38 +01:00
DeclTemplate.cpp Suppress printing template arguments that match default template 2020-11-11 15:05:51 -08:00
DeclarationName.cpp [OpenMP] `omp begin/end declare variant` - part 2, sema ("+CG") 2020-03-27 02:30:58 -05:00
Expr.cpp [AST] Fix traversal over CXXConstructExpr in Syntactic mode 2020-10-30 12:14:41 +00:00
ExprCXX.cpp PR47954 / DR2126: permit temporary objects that are lifetime-extended by 2020-10-23 14:29:18 -07:00
ExprClassification.cpp [c++20] For P0732R2 / P1907R1: Basic frontend support for class types as 2020-10-21 13:21:41 -07:00
ExprConcepts.cpp [AST] Make Expr::setDependence protected and remove add/removeDependence. NFC 2020-03-19 21:54:40 +01:00
ExprConstant.cpp Move code to determine the type of an LValueBase out of ExprConstant and 2020-11-10 13:03:57 -08:00
ExprObjC.cpp [AST] Move dependence computations into a separate file 2020-03-17 09:22:31 +01:00
ExternalASTMerger.cpp Modernize llvm::Error handling in ExternalASTMerger 2019-11-14 13:58:32 +01:00
ExternalASTSource.cpp Avoid including FileManager.h from SourceManager.h 2020-03-11 13:53:12 -07:00
FormatString.cpp [Sema] Emit a -Wformat warning for printf("%s", (void*)p) 2020-07-10 15:10:24 -04:00
FormatStringParsing.h Add a missing header comment, NFC 2019-08-13 22:01:39 +00:00
InheritViz.cpp Silence static analyzer getAs<RecordType> null dereference warnings. NFCI. 2019-10-03 11:22:48 +00:00
ItaniumCXXABI.cpp [c++20] Fix some ambiguities in our mangling of lambdas with explicit 2019-09-05 01:23:47 +00:00
ItaniumMangle.cpp [Matrix] Update mangling to use paramterized vendor ext type syntax. 2020-11-11 21:39:22 +00:00
JSONNodeDumper.cpp [clang][NFC] Use SmallString instead of SmallVector<char 2020-11-17 13:02:58 +00:00
Linkage.h [c++20] For P0732R2 / P1907R1: Basic code generation and name 2020-11-09 22:10:27 -08:00
Mangle.cpp Fix a variety of minor issues with ObjC method mangling: 2020-09-29 19:51:53 -04:00
MicrosoftCXXABI.cpp Separate the MS inheritance model enum from the attribute, NFC 2019-11-22 16:06:30 -08:00
MicrosoftMangle.cpp [c++20] For P0732R2 / P1907R1: Basic code generation and name 2020-11-09 22:10:27 -08:00
NSAPI.cpp [Clang][PowerPC] Add __vector_pair and __vector_quad types 2020-10-28 13:19:20 -05:00
NestedNameSpecifier.cpp [AST][RecoveryExpr] Avoid spurious 'missing typename' diagnostic when the NNS contains errors. 2020-06-30 16:18:32 +02:00
ODRHash.cpp [ODRHash] Remove use of 'whitelist'. 2020-06-19 18:39:30 -07:00
OSLog.cpp [clang][NFC] Add 'override' keyword to virtual function overrides 2020-07-14 08:59:57 -07:00
OpenMPClause.cpp [OpenMP][FIX] Do not drop a '$' while demangling declare variant names 2020-09-16 13:37:09 -05:00
ParentMap.cpp [OPENMP]Fix PR42632: crash on the analysis of the OpenMP constructs. 2019-07-17 18:03:39 +00:00
ParentMapContext.cpp [AST] Fix traversal over CXXConstructExpr in Syntactic mode 2020-10-30 12:14:41 +00:00
PrintfFormatString.cpp [Clang][PowerPC] Add __vector_pair and __vector_quad types 2020-10-28 13:19:20 -05:00
QualTypeNames.cpp Fix crash in getFullyQualifiedName for inline namespace 2019-12-28 16:35:51 +03:00
RawCommentList.cpp [clang] fix undefined behaviour in RawComment::getFormattedText() 2020-04-06 10:48:25 +02:00
RecordLayout.cpp [AIX] Implement AIX special alignment rule about double/long double 2020-07-27 15:13:03 -04:00
RecordLayoutBuilder.cpp [AST] Change return type of getTypeInfoInChars to a proper struct instead of std::pair. 2020-10-13 13:26:56 +02:00
ScanfFormatString.cpp Fix parameter name comments using clang-tidy. NFC. 2019-07-16 04:46:31 +00:00
SelectorLocationsKind.cpp
Stmt.cpp [CodeGen] Implement [[likely]] and [[unlikely]] for while and for loop. 2020-10-31 17:51:29 +01:00
StmtCXX.cpp
StmtIterator.cpp
StmtObjC.cpp
StmtOpenMP.cpp [OPENMP]Redesign of OMPExecutableDirective/OMPDeclarativeDirective representation. 2020-08-06 12:25:19 -04:00
StmtPrinter.cpp [c++20] For P0732R2 / P1907R1: Basic frontend support for class types as 2020-10-21 13:21:41 -07:00
StmtProfile.cpp [OPENMP50]Codegen for inscan reductions in worksharing directives. 2020-06-04 16:29:33 -04:00
StmtViz.cpp
TemplateBase.cpp Fix structural comparison of template template arguments to compare the 2020-11-11 19:15:21 -08:00
TemplateName.cpp [NFC] Refactor DiagnosticBuilder and PartialDiagnostic 2020-10-19 17:48:04 -04:00
TextNodeDumper.cpp [FPEnv] Evaluate constant expressions under non-default rounding modes 2020-09-26 17:59:39 +07:00
Type.cpp [Clang][PowerPC] Add __vector_pair and __vector_quad types 2020-10-28 13:19:20 -05:00
TypeLoc.cpp [Clang][PowerPC] Add __vector_pair and __vector_quad types 2020-10-28 13:19:20 -05:00
TypePrinter.cpp Suppress printing of inline namespace names in diagnostics by default, 2020-11-11 15:05:51 -08:00
VTTBuilder.cpp Silence static analyzer getAs<RecordType> null dereference warnings. NFCI. 2019-10-03 11:22:48 +00:00
VTableBuilder.cpp [c++20] consteval functions don't get vtable slots. 2020-06-30 18:22:09 -07:00