aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/SemaChecking.cpp
AgeCommit message (Collapse)AuthorFilesLines
2021-01-02[PowerPC] Support powerpcle target in Clang [3/5]Brandon Bergren1-0/+1
Add powerpcle support to clang. For FreeBSD, assume a freestanding environment for now, as we only need it in the first place to build loader, which runs in the OpenFirmware environment instead of the FreeBSD environment. For Linux, recognize glibc and musl environments to match current usage in Void Linux PPC. Adjust driver to match current binutils behavior regarding machine naming. Adjust and expand tests. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D93919
2020-12-17[PowerPC] Rename the vector pair intrinsics and builtins to replace the ↵Baptiste Saleil1-2/+2
_mma_ prefix by _vsx_ On PPC, the vector pair instructions are independent from MMA. This patch renames the vector pair LLVM intrinsics and Clang builtins to replace the _mma_ prefix by _vsx_ in their names. We also move the vector pair type/intrinsic/builtin tests to their own files. Differential Revision: https://reviews.llvm.org/D91974
2020-12-15[PowerPC] Enable paired vector type and intrinsics when MMA is disabledBaptiste Saleil1-2/+2
This patch enables the Clang type __vector_pair and its associated LLVM intrinsics even when MMA is disabled. With this patch, the type is now controlled by the PPC paired-vector-memops option. The builtins and intrinsics will be renamed to drop the mma prefix in another patch. Differential Revision: https://reviews.llvm.org/D91819
2020-11-16BPF: make __builtin_btf_type_id() return 64bit intYonghong Song1-0/+2
Linux kernel recently added support for kernel modules https://lore.kernel.org/bpf/20201110011932.3201430-5-andrii@kernel.org/ In such cases, a type id in the kernel needs to be presented as (btf id for modules, btf type id for this module). Change __builtin_btf_type_id() to return 64bit value so libbpf can do the above encoding. Differential Revision: https://reviews.llvm.org/D91489
2020-11-04[PowerPC] Add Sema checks for MMA typesBaptiste Saleil1-0/+22
The use of the new types introduced for PowerPC MMA instructions needs to be restricted. We add a PowerPC function checking that the given type is valid in a context in which we don't allow MMA types. This function is called from various places in Sema where we want to prevent the use of these types. Differential Revision: https://reviews.llvm.org/D82035
2020-11-03[PowerPC] Add MMA builtin decoding and definitionsBaptiste Saleil1-0/+118
Add MMA builtin decoding. These builtins use the new PowerPC-specific types __vector_pair and __vector_quad. So to avoid pervasive changes, we use custom type descriptors and custom decoding for these builtins. We also use custom code generation to expand builtin calls with pointers to simpler intrinsic calls with non-pointer types. Differential Revision: https://reviews.llvm.org/D81748
2020-11-02[Sema] adds -Wfree-nonheap-object member var checksChristopher Di Bella1-13/+24
Checks to make sure that stdlib's (std::)free is being appropriately used for member variables. Differential Revision: https://reviews.llvm.org/D90269
2020-10-28[Sema] adds basic -Wfree-nonheap-object functionalityChristopher Di Bella1-5/+64
Checks to make sure that stdlib's (std::)free is being appropriately used. Presently checks for the following misuses: - free(&stack_object) - free(stack_array) Differential Revision: https://reviews.llvm.org/D89988
2020-10-24For P0732R2, P1907R1: ensure that template parameter objects don't referRichard Smith1-4/+2
to disallowed objects or have non-constant destruction.
2020-10-02Don't reject calls to MinGW's unusual _setjmp declaration.Richard Smith1-5/+0
We now recognize this function as a builtin despite it having an unexpected number of parameters; make sure we don't enforce that it has only 1 argument for its 2 parameters.
2020-09-29Revert "[Sema] Address-space sensitive check for unbounded arrays (v2)"Chris Hamilton1-76/+13
This reverts commit d9ee935679e7164d1c47e351bbbcf5c25742b59c.
2020-09-29[Sema] Address-space sensitive check for unbounded arrays (v2)Chris Hamilton1-13/+76
Check applied to unbounded (incomplete) arrays and pointers to spot cases where the computed address is beyond the largest possible addressable extent of the array, based on the address space in which the array is delcared, or which the pointer refers to. Check helps to avoid cases of nonsense pointer math and array indexing which could lead to linker failures or runtime exceptions. Of particular interest when building for embedded systems with small address spaces. This is version 2 of this patch -- version 1 had some testing issues due to a sign error in existing code. That error is corrected and lit test for this chagne is extended to verify the fix. Originally reviewed/accepted by: aaron.ballman Original revision: https://reviews.llvm.org/D86796 Reviewed By: ebevhan Differential Revision: https://reviews.llvm.org/D88174
2020-09-23[Power10] Implement custom codegen for the vec_replace_elt and ↵Amy Kwan1-0/+19
vec_replace_unaligned builtins. This patch implements custom codegen for the vec_replace_elt and vec_replace_unaligned builtins. These builtins map to the @llvm.ppc.altivec.vinsw and @llvm.ppc.altivec.vinsd intrinsics depending on the arguments. The main motivation for doing custom codegen for these intrinsics is because there are float and double versions of the builtin. Normally, the converting the float to an integer would be done via fptoui in the IR. This is incorrect as fptoui truncates the value and we must ensure the value is not truncated. Therefore, we provide custom codegen to utilize bitcast instead as bitcasts do not truncate. Differential Revision: https://reviews.llvm.org/D83500
2020-09-15Revert "[Sema] Address-space sensitive index check for unbounded arrays"Chris Hamilton1-73/+12
This reverts commit da55e9ba1273284f1af61bceeaeb25e487838034. Build bots uncovered coverage gap in testing. Change not ready.
2020-09-14[Sema] Address-space sensitive index check for unbounded arraysChris Hamilton1-12/+73
Check applied to unbounded (incomplete) arrays and pointers to spot cases where the computed address is beyond the largest possible addressable extent of the array, based on the address space in which the array is delcared, or which the pointer refers to. Check helps to avoid cases of nonsense pointer math and array indexing which could lead to linker failures or runtime exceptions. Of particular interest when building for embedded systems with small address spaces. Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D86796
2020-09-01Don't take the expression range into account when looking for wideningRichard Smith1-12/+11
of a unary - expression. This fixes an issue where we'd produce bogus diagnostics, and also should recover ~0.3% compile time.
2020-08-31Classify (small unsigned bitfield) < 0 comparisons underRichard Smith1-0/+6
-Wtautological-unsigned-zero-compare not under -Wtautological-value-range-compare.
2020-08-31More accurately compute the ranges of possible values for +, -, *, &, %.Richard Smith1-62/+154
Continue to heuristically pick the wider of the two operands for narrowing conversion warnings so that some_char + 1 isn't treated as being wider than a char, but use the more accurate computation for tautological comparison warnings. Differential Revision: https://reviews.llvm.org/D85778
2020-08-20[ADT] Move FixedPoint.h from Clang to LLVM.Bevin Hansson1-5/+5
This patch moves FixedPointSemantics and APFixedPoint from Clang to LLVM ADT. This will make it easier to use the fixed-point classes in LLVM for constructing an IR builder for fixed-point and for reusing the APFixedPoint class for constant evaluation purposes. RFC: http://lists.llvm.org/pipermail/llvm-dev/2020-August/144025.html Reviewed By: leonardchan, rjmccall Differential Revision: https://reviews.llvm.org/D85312
2020-08-18[X86] Don't call SemaBuiltinConstantArg from CheckX86BuiltinTileDuplicate if ↵Craig Topper1-8/+9
Argument is Type or Value Dependent. SemaBuiltinConstantArg has an early exit for that case that doesn't produce an error and doesn't update the APInt. We need to detect that case and not use the APInt value. While there delete the signature of CheckX86BuiltinTileArgumentsRange that takes a single Argument index to check. There's another version that takes an ArrayRef and single value is convertible to an ArrayRef.
2020-08-18Disable use of _ExtInt with '__atomic' builtinsMott, Jeffrey T1-0/+5
We're (temporarily) disabling ExtInt for the '__atomic' builtins so we can better design their behavior later. The idea is until we do an audit/design for the way atomic builtins are supposed to work with _ExtInt, we should leave them restricted so they don't limit our future options, such as by binding us to a sub-optimal implementation via ABI. Example after this change: $ cat test.c void f(_ExtInt(64) *ptr) { __atomic_fetch_add(ptr, 1, 0); } $ clang -c test.c test.c:2:22: error: argument to atomic builtin of type '_ExtInt' is not supported __atomic_fetch_add(ptr, 1, 0); ^ 1 error generated. Differential Revision: https://reviews.llvm.org/D84049
2020-08-16[Sema] Validate calls to GetExprRange.Mark de Wever1-4/+10
When a conditional expression has a throw expression it called GetExprRange with a void expression, which caused an assertion failure. This approach was suggested by Richard Smith. Fixes PR46484: Clang crash in clang/lib/Sema/SemaChecking.cpp:10028 Differential Revision: https://reviews.llvm.org/D85601
2020-08-06Add -Wtautological-value-range-compare warning.Richard Smith1-10/+34
This warning diagnoses cases where an expression is compared to a constant, and the comparison is tautological due to the form of the expression (but not merely due to its type). This applies in cases such as comparisons of bit-fields and the result of bit-masks. The new warning is added to the Clang diagnostic group -Wtautological-constant-in-range-compare but not to the formerly-equivalent GCC-compatibility diagnostic group -Wtype-limits, which retains its old meaning of diagnosing only tautological comparisons to extremal values of a type (eg, int > INT_MAX). Reviewed By: rtrieu Differential Revision: https://reviews.llvm.org/D85256
2020-08-05[clang][nearly-NFC] Remove some superfluous uses of NamedDecl::getNameAsStringBruno Ricci1-1/+1
`OS << ND->getDeclName();` is equivalent to `OS << ND->getNameAsString();` without the extra temporary string. This is not quite a NFC since two uses of `getNameAsString` in a diagnostic are replaced, which results in the named entity being quoted with additional "'"s (ie: 'var' instead of var).
2020-08-04[clang][BPF] support type exist/size and enum exist/value relocationsYonghong Song1-31/+130
This patch added the following additional compile-once run-everywhere (CO-RE) relocations: - existence/size of typedef, struct/union or enum type - enum value and enum value existence These additional relocations will make CO-RE bpf programs more adaptive for potential kernel internal data structure changes. For existence/size relocations, the following two code patterns are supported: 1. uint32_t __builtin_preserve_type_info(*(<type> *)0, flag); 2. <type> var; uint32_t __builtin_preserve_field_info(var, flag); flag = 0 for existence relocation and flag = 1 for size relocation. For enum value existence and enum value relocations, the following code pattern is supported: uint64_t __builtin_preserve_enum_value(*(<enum_type> *)<enum_value>, flag); flag = 0 means existence relocation and flag = 1 for enum value. relocation. In the above <enum_type> can be an enum type or a typedef to enum type. The <enum_value> needs to be an enumerator value from the same enum type. The return type is uint64_t to permit potential 64bit enumerator values. Differential Revision: https://reviews.llvm.org/D83242
2020-07-28[NFC] Sema: use checkArgCount instead of custom checkingJF Bastien1-47/+8
As requested in D79279. Differential Revision: https://reviews.llvm.org/D84666
2020-07-28[clang] Pass the NamedDecl* instead of the DeclarationName into many ↵Bruno Ricci1-2/+1
diagnostics. Background: ----------- There are two related argument types which can be sent into a diagnostic to display the name of an entity: DeclarationName (ak_declarationname) or NamedDecl* (ak_nameddecl) (there is also ak_identifierinfo for IdentifierInfo*, but we are not concerned with it here). A DeclarationName in a diagnostic will just be streamed to the output, which will directly result in a call to DeclarationName::print. A NamedDecl* in a diagnostic will also ultimately result in a call to DeclarationName::print, but with two customisation points along the way: The first customisation point is NamedDecl::getNameForDiagnostic which is overloaded by FunctionDecl, ClassTemplateSpecializationDecl and VarTemplateSpecializationDecl to print the template arguments, if any. The second customisation point is NamedDecl::printName. By default it just streams the stored DeclarationName into the output but it can be customised to provide a user-friendly name for an entity. It is currently overloaded by DecompositionDecl and MSGuidDecl. What this patch does: --------------------- For many diagnostics a DeclarationName is used instead of the NamedDecl*. This bypasses the two customisation points mentioned above. This patches fix this for diagnostics in Sema.cpp, SemaCast.cpp, SemaChecking.cpp, SemaDecl.cpp, SemaDeclAttr.cpp, SemaDecl.cpp, SemaOverload.cpp and SemaStmt.cpp. I have only modified diagnostics where I could construct a test-case which demonstrates that the change is appropriate (either with this patch or the next one). Reviewed By: erichkeane, aaron.ballman Differential Revision: https://reviews.llvm.org/D84656
2020-07-22For PR46800, implement the GCC __builtin_complex builtin.Richard Smith1-0/+59
glibc's implementation of the CMPLX macro uses it (with -fgnuc-version set to 4.7 or later).
2020-07-21Reapply "Rename/refactor isIntegerConstantExpression to ↵David Blaikie1-78/+76
getIntegerConstantExpression" Reapply 49e5f603d40083dce9c05796e3cde3a185c3beba which had been reverted in c94332919bd922032e979b3ae3ced5ca5bdf9650. Originally reverted because I hadn't updated it in quite a while when I got around to committing it, so there were a bunch of missing changes to new code since I'd written the patch. Reviewers: aaron.ballman Differential Revision: https://reviews.llvm.org/D76646
2020-07-14Prohibit use of _ExtInt in atomic intrinsicMott, Jeffrey T1-0/+9
The _ExtInt type allows custom width integers, but the atomic memory access's operand must have a power-of-two size. _ExtInts with non-power-of-two size should not be allowed for atomic intrinsic. Before this change: $ cat test.c typedef unsigned _ExtInt(42) dtype; void verify_binary_op_nand(dtype* pval1, dtype val2) { __sync_nand_and_fetch(pval1, val2); } $ clang test.c clang-11: /home/ubuntu/llvm_workspace/llvm/clang/lib/CodeGen/CGBuiltin.cpp:117: llvm::Value* EmitToInt(clang::CodeGen::CodeGenFunction&, llvm::Value*, clang::QualType, llvm::IntegerType*): Assertion `V->getType() == IntType' failed. PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script. After this change: $ clang test.c test.c:3:30: error: Atomic memory operand must have a power-of-two size { __sync_nand_and_fetch(pval1, val2); } ^ List of the atomic intrinsics that have this problem: __sync_fetch_and_add __sync_fetch_and_sub __sync_fetch_and_or __sync_fetch_and_and __sync_fetch_and_xor __sync_fetch_and_nand __sync_nand_and_fetch __sync_and_and_fetch __sync_add_and_fetch __sync_sub_and_fetch __sync_or_and_fetch __sync_xor_and_fetch __sync_fetch_and_min __sync_fetch_and_max __sync_fetch_and_umin __sync_fetch_and_umax __sync_val_compare_and_swap __sync_bool_compare_and_swap Differential Revision: https://reviews.llvm.org/D83340
2020-07-12Revert "Rename/refactor isIntegerConstantExpression to ↵David Blaikie1-51/+56
getIntegerConstantExpression" Broke buildbots since I hadn't updated this patch in a while. Sorry for the noise. This reverts commit 49e5f603d40083dce9c05796e3cde3a185c3beba.
2020-07-12Rename/refactor isIntegerConstantExpression to getIntegerConstantExpressionDavid Blaikie1-56/+51
There is a version that just tests (also called isIntegerConstantExpression) & whereas this version is specifically used when the value is of interest (a few call sites were actually refactored to calling the test-only version) so let's make the API look more like it. Reviewers: aaron.ballman Differential Revision: https://reviews.llvm.org/D76646
2020-07-07[Sema] Teach -Wcast-align to compute alignment of CXXThisExprAkira Hatanaka1-3/+10
This fixes https://bugs.llvm.org/show_bug.cgi?id=46605. rdar://problem/65158878 Differential Revision: https://reviews.llvm.org/D83317
2020-07-07[SemaObjC] Fix a -Wobjc-signed-char-bool false-positive with binary ↵Erik Pilkington1-7/+11
conditional operator We were previously bypassing the conditional expression special case for binary conditional expressions. rdar://64134411 Differential revision: https://reviews.llvm.org/D81751
2020-07-07[X86-64] Support Intel AMX IntrinsicXiang1 Zhang1-0/+63
INTEL ADVANCED MATRIX EXTENSIONS (AMX). AMX is a new programming paradigm, it has a set of 2-dimensional registers (TILES) representing sub-arrays from a larger 2-dimensional memory image and operate on TILES. These intrinsics use direct TMM register number as its params. Spec can be found in Chapter 3 here https://software.intel.com/content/www/us/en/develop/download/intel-architecture-instruction-set-extensions-programming-reference.html Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D83111
2020-07-03[clang] Check ValueDependent instead of InstantiationDependent before ↵Haojian Wu1-2/+2
executing the align expr for builtin align functions. in general, value dependent is a subset of instnatiation dependent. This would allows us to produce diagnostics for the align expression (which is instantiation dependent but not value dependent). Differential Revision: https://reviews.llvm.org/D83074
2020-07-02[PowerPC]Implement Vector Permute Extended BuiltinBiplob Mishra1-0/+2
Implements vector permute builtin: vec_permx() Differential Revision: https://reviews.llvm.org/D82869
2020-07-01[PowerPC]Implement Vector Shift Double Bit Immediate BuiltinsBiplob Mishra1-0/+4
Implement Vector Shift Double Bit Immediate Builtins in LLVM/Clang. * vec_sldb (); * vec_srdb (); Differential Revision: https://reviews.llvm.org/D82440
2020-06-25[PowerPC][Power10] Implement centrifuge, vector gather every nth bit, vector ↵Amy Kwan1-0/+4
evaluate Builtins in LLVM/Clang This patch implements builtins for the following prototypes: unsigned long long __builtin_cfuged (unsigned long long, unsigned long long); vector unsigned long long vec_cfuge (vector unsigned long long, vector unsigned long long); unsigned long long vec_gnb (vector unsigned __int128, const unsigned int); vector unsigned char vec_ternarylogic (vector unsigned char, vector unsigned char, vector unsigned char, const unsigned int); vector unsigned short vec_ternarylogic (vector unsigned short, vector unsigned short, vector unsigned short, const unsigned int); vector unsigned int vec_ternarylogic (vector unsigned int, vector unsigned int, vector unsigned int, const unsigned int); vector unsigned long long vec_ternarylogic (vector unsigned long long, vector unsigned long long, vector unsigned long long, const unsigned int); vector unsigned __int128 vec_ternarylogic (vector unsigned __int128, vector unsigned __int128, vector unsigned __int128, const unsigned int); Differential Revision: https://reviews.llvm.org/D80970
2020-06-25[Matrix] Use 1st/2nd instead of first/second in matrix diags.Florian Hahn1-5/+7
This was suggested in D72782 and brings the diagnostics more in line with how argument references are handled elsewhere. Reviewers: rjmccall, jfb, Bigcheese Reviewed By: rjmccall Differential Revision: https://reviews.llvm.org/D82473
2020-06-22Add support of __builtin_expect_with_probabilityZhi Zhuang1-0/+30
Add a new builtin-function __builtin_expect_with_probability and intrinsic llvm.expect.with.probability. The interface is __builtin_expect_with_probability(long expr, long expected, double probability). It is mainly the same as __builtin_expect besides one more argument indicating the probability of expression equal to expected value. The probability should be a constant floating-point expression and be in range [0.0, 1.0] inclusive. It is similar to builtin-expect-with-probability function in GCC built-in functions. Differential Revision: https://reviews.llvm.org/D79830
2020-06-20[clang] SequenceChecker: C++17 sequencing rule for overloaded operators.Bruno Ricci1-0/+124
In C++17 the operand(s) of an overloaded operator are sequenced as for the corresponding built-in operator when the overloaded operator is called with the operator notation ([over.match.oper]p2). Reported in PR35340. Differential Revision: https://reviews.llvm.org/D81330 Reviewed By: rsmith
2020-06-20[AST/Lex/Parse/Sema] As part of using inclusive language withinEric Christopher1-4/+4
the llvm project, migrate away from the use of blacklist and whitelist.
2020-06-18[Matrix] Add __builtin_matrix_column_store to Clang.Florian Hahn1-3/+102
This patch add __builtin_matrix_column_major_store to Clang, as described in clang/docs/MatrixTypes.rst. In the initial version, the stride is not optional yet. Reviewers: rjmccall, jfb, rsmith, Bigcheese Reviewed By: rjmccall Differential Revision: https://reviews.llvm.org/D72782
2020-06-18[SveEmitter] Add builtins to insert/extract subvectors from tuples (svget/svset)Sander de Smalen1-0/+12
For example: svint32_t svget4(svint32x4_t tuple, uint64_t imm_index) returns the subvector at `index`, which must be in range `0..3`. svint32x3_t svset3(svint32x3_t tuple, uint64_t index, svint32_t vec) returns a tuple vector with `vec` inserted into `tuple` at `index`, which must be in range `0..2`. Reviewers: c-rhodes, efriedma Reviewed By: c-rhodes Tags: #clang Differential Revision: https://reviews.llvm.org/D81464
2020-06-18[Matrix] Add __builtin_matrix_column_load to Clang.Florian Hahn1-0/+132
This patch add __builtin_matrix_column_major_load to Clang, as described in clang/docs/MatrixTypes.rst. In the initial version, the stride is not optional yet. Reviewers: rjmccall, rsmith, jfb, Bigcheese Reviewed By: rjmccall Differential Revision: https://reviews.llvm.org/D72781
2020-06-15[clang] Fix or emit diagnostic for checked arithmetic builtins withJeff Mott1-19/+31
_ExtInt types - Fix computed size for _ExtInt types passed to checked arithmetic builtins. - Emit diagnostic when signed _ExtInt larger than 128-bits is passed to __builtin_mul_overflow. - Change Sema checks for builtins to accept placeholder types. Differential Revision: https://reviews.llvm.org/D81420
2020-06-09[AMDGPU] Introduce Clang builtins to be mapped to AMDGCN atomic inc/dec ↵Saiyedul Islam1-32/+47
intrinsics Summary: __builtin_amdgcn_atomic_inc32(int *Ptr, int Val, unsigned MemoryOrdering, const char *SyncScope) __builtin_amdgcn_atomic_inc64(int64_t *Ptr, int64_t Val, unsigned MemoryOrdering, const char *SyncScope) __builtin_amdgcn_atomic_dec32(int *Ptr, int Val, unsigned MemoryOrdering, const char *SyncScope) __builtin_amdgcn_atomic_dec64(int64_t *Ptr, int64_t Val, unsigned MemoryOrdering, const char *SyncScope) First and second arguments gets transparently passed to the amdgcn atomic inc/dec intrinsic. Fifth argument of the intrinsic is set as true if the first argument of the builtin is a volatile pointer. The third argument of this builtin is one of the memory-ordering specifiers ATOMIC_ACQUIRE, ATOMIC_RELEASE, ATOMIC_ACQ_REL, or ATOMIC_SEQ_CST following C++11 memory model semantics. This is mapped to corresponding LLVM atomic memory ordering for the atomic inc/dec instruction using CLANG atomic C ABI. The fourth argument is an AMDGPU-specific synchronization scope defined as string. Reviewers: arsenm, sameerds, JonChesterfield, jdoerfert Reviewed By: arsenm, sameerds Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, jfb, kerbowa, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D80804
2020-06-09[Matrix] Add __builtin_matrix_transpose to Clang.Florian Hahn1-1/+34
This patch add __builtin_matrix_transpose to Clang, as described in clang/docs/MatrixTypes.rst. Reviewers: rjmccall, jfb, rsmith, Bigcheese Reviewed By: rjmccall Differential Revision: https://reviews.llvm.org/D72778
2020-06-05[ARM] Add __bf16 as new Bfloat16 C TypeTies Stuij1-0/+5
Summary: This patch upstreams support for a new storage only bfloat16 C type. This type is used to implement primitive support for bfloat16 data, in line with the Bfloat16 extension of the Armv8.6-a architecture, as detailed here: https://community.arm.com/developer/ip-products/processors/b/processors-ip-blog/posts/arm-architecture-developments-armv8-6-a The bfloat type, and its properties are specified in the Arm Architecture Reference Manual: https://developer.arm.com/docs/ddi0487/latest/arm-architecture-reference-manual-armv8-for-armv8-a-architecture-profile In detail this patch: - introduces an opaque, storage-only C-type __bf16, which introduces a new bfloat IR type. This is part of a patch series, starting with command-line and Bfloat16 assembly support. The subsequent patches will upstream intrinsics support for BFloat16, followed by Matrix Multiplication and the remaining Virtualization features of the armv8.6-a architecture. The following people contributed to this patch: - Luke Cheeseman - Momchil Velikov - Alexandros Lamprineas - Luke Geeson - Simon Tatham - Ties Stuij Reviewers: SjoerdMeijer, rjmccall, rsmith, liutianle, RKSimon, craig.topper, jfb, LukeGeeson, fpetrogalli Reviewed By: SjoerdMeijer Subscribers: labrinea, majnemer, asmith, dexonsmith, kristof.beyls, arphaman, danielkiss, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D76077