llvm-project/clang/test
Simon Tatham 1d78294250 [Sema][BFloat] Forbid arithmetic on vectors of bfloat.
Vectors of bfloat are a storage format only; you're supposed to
explicitly convert them to a wider type to do arithmetic on them.
But currently, if you write something like

  bfloat16x4_t test(bfloat16x4_t a, bfloat16x4_t b) { return a + b; }

then the clang frontend accepts it without error, and (ARM or AArch64)
isel fails to generate code for it.

Added a rule in Sema that forbids the attempt from even being made,
and tests that check it. In particular, we also outlaw arithmetic
between vectors of bfloat and any other vector type.

Patch by Luke Cheeseman.

Reviewed By: LukeGeeson

Differential Revision: https://reviews.llvm.org/D85009
2020-08-07 11:25:19 +01:00
..
ARCMT
AST PR30738: Implement two-phase name lookup for fold-expressions. 2020-08-06 16:56:39 -07:00
ASTMerge
Analysis [Analyzer][WebKit] UncountedLambdaCaptureChecker 2020-08-05 15:23:55 -08:00
CXX DR2303: Prefer 'nearer' base classes during template deduction. 2020-07-31 05:39:55 -07:00
ClangScanDeps
CodeCompletion [CodeComplete] Add code completion after function equals 2020-07-01 12:51:25 +08:00
CodeGen [PowerPC] Implement Vector Extract Low/High Order Builtins in LLVM/Clang 2020-08-07 01:02:29 -05:00
CodeGenCUDA clang: Use byref for aggregate kernel arguments 2020-08-06 15:52:26 -04:00
CodeGenCXX [clang][ARM] Add name-mangling test for direct __fp16 arguments. 2020-08-03 13:30:50 +01:00
CodeGenCoroutines [Coroutines] Ensure co_await promise.final_suspend() does not throw 2020-06-22 15:01:42 -07:00
CodeGenHIP [NFC] Fixed ignored .hip test. 2020-06-29 18:57:14 +03:00
CodeGenObjC [CodeGen][ObjC] Mark calls to objc_unsafeClaimAutoreleasedReturnValue as 2020-08-03 13:25:25 -07:00
CodeGenObjCXX Re-enable "[InstCombine] Simplify boolean Phis with const inputs using CFG" 2020-07-16 16:09:08 +07:00
CodeGenOpenCL clang: Use byref for aggregate kernel arguments 2020-08-06 15:52:26 -04:00
CodeGenOpenCLCXX
CodeGenSYCL
Coverage
CoverageMapping Reland [Coverage] Add comment to skipped regions 2020-07-28 13:20:57 -07:00
Driver [clang, test, Darwin] Fix tests expecting Darwin target 2020-08-07 09:21:31 +01:00
FixIt
Format
Frontend [clang] Teach -fembed-bitcode option not to embed W_value Group 2020-07-14 14:40:43 -07:00
Headers [WebAssembly] Fix types in wasm_simd128.h and add tests 2020-08-05 14:00:01 -07:00
Import [clang] Rework how and when APValues are dumped 2020-07-06 22:03:08 +01:00
Index [clang][nearly-NFC] Remove some superfluous uses of NamedDecl::getNameAsString 2020-08-05 13:54:37 +01:00
Integration
InterfaceStubs [llvm-readobj] Update tests because of changes in llvm-readobj behavior 2020-07-20 10:39:04 +01:00
Layout [AIX] Implement AIX special alignment rule about double/long double 2020-07-27 15:13:03 -04:00
Lexer
Misc Re-land "[PowerPC] Remove QPX/A2Q BGQ/BGP CNK support" 2020-07-28 14:00:11 +00:00
Modules [clang] Pass the NamedDecl* instead of the DeclarationName into many diagnostics. 2020-07-28 10:30:35 +01:00
OpenMP [OPENMP]Redesign of OMPExecutableDirective/OMPDeclarativeDirective representation. 2020-08-06 12:25:19 -04:00
PCH Don't crash if we deserialize a pack expansion type whose pattern 2020-07-31 17:19:44 -07:00
Parser PR46231: Promote diagnostic for 'template<...>;' from ExtWarn to Error. 2020-07-29 12:35:18 -07:00
ParserSYCL
Preprocessor Re-land "[PowerPC] Remove QPX/A2Q BGQ/BGP CNK support" 2020-07-28 14:00:11 +00:00
Profile [PGO] Include the mem ops into the function hash. 2020-07-30 09:26:20 -07:00
Refactor
Rewriter
Sema [Sema][BFloat] Forbid arithmetic on vectors of bfloat. 2020-08-07 11:25:19 +01:00
SemaCUDA recommit 4fc752b30b [CUDA][HIP] Always defer diagnostics for wrong-sided reference 2020-07-17 09:14:39 -04:00
SemaCXX [clang][nearly-NFC] Remove some superfluous uses of NamedDecl::getNameAsString 2020-08-05 13:54:37 +01:00
SemaObjC [clang][NFC] Tests showing the problems with some uses of NamedDecl::getDeclName in diagnostics, SemaOverload.cpp+SemaStmt.cpp part 2020-07-18 20:44:06 +01:00
SemaObjCXX Clang crashed while checking for deletion of copy and move ctors 2020-07-07 14:40:37 -04:00
SemaOpenCL [OpenCL] Add global_device and global_host address spaces 2020-07-29 17:24:53 +03:00
SemaOpenCLCXX [OpenCL] Fixed missing address space for templated copy constructor. 2020-07-27 15:18:49 +01:00
SemaSYCL [SYCL][OpenMP] Implement thread-local storage restriction 2020-06-17 14:36:00 +03:00
SemaTemplate [AST][RecoveryExpr] Fix the missing type when rebuilding RecoveryExpr in TreeTransform. 2020-08-07 11:15:19 +02:00
TableGen
Templight
Tooling [clang] Rework how and when APValues are dumped 2020-07-06 22:03:08 +01:00
Unit
VFS
clang-rename
utils/update_cc_test_checks [update_cc_test_checks.py] Add test for D84511 2020-08-06 09:15:56 +01:00
.clang-format [clang] Partially revert "Disable a few formatting options for test/" 2020-07-21 14:53:37 +01:00
CMakeLists.txt Revert "[CMake] Simplify CMake handling for zlib" 2020-08-07 09:36:49 +02:00
TestRunner.sh
cxx-sections.data
lit.cfg.py Reland [Coverage] Add comment to skipped regions 2020-07-28 13:20:57 -07:00
lit.site.cfg.py.in Revert "[CMake] Simplify CMake handling for zlib" 2020-08-07 09:36:49 +02:00
make_test_dirs.pl