summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/x86_64-arguments-avx.cpp
Commit message (Collapse)AuthorAgeFilesLines
* LLVM IR: Generate new-style byval-with-Type from ClangTim Northover2019-06-051-1/+1
| | | | | | | | | | | LLVM IR recently added a Type parameter to the byval Attribute, so that when pointers become opaque and no longer have an element type the information will still be present in IR. For now the Type parameter is optional (which is why Clang didn't need this change at the time), but it will become mandatory soon. llvm-svn: 362652
* [CodeGen] Don't crash classifying a union of an AVX vector and an intDavid Majnemer2015-07-081-0/+9
| | | | | | | | | | | | We forgot to run postMerge after decided that the union had to be classified as MEMORY. This left us with Lo == MEMORY and Hi == SSEUp which is an invalid combination. This fixes PR24021. Differential Revision: http://reviews.llvm.org/D10908 llvm-svn: 241666
* [x86-64 ABI] Fix for PR23082: an assertion failure when passing/returning a ↵Andrea Di Biagio2015-06-021-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wrapper union in a full YMM register. This patch fixes an assertion failure in method 'X86_64ABIInfo::GetByteVectorType'. Method 'GetByteVectorType' (in TargetInfo.cpp) is responsible for mapping a QualType 'Ty' (for an argument or return value) to an LLVM IR type that, according to the ABI, must be passed in a XMM/YMM vector register. When selecting the IR vector type, method 'GetByteVectorType' always tries to choose the "best" IR vector type for the 'Ty' in input. In particular, if Ty is a wrapper structure, it keeps unwrapping it until it finds a vector type VTy. That VTy is the "preferred IR type". However, function 'isSingleElementStructure' (used to unwrap structures) does not know how to look through union types. So, before this patch, if Ty was in a nest of wrapper structures with at least two union types, we would have triggered an assertion failure (added at revision 230971). With this patch, if method 'GetByteVectorType' fails to find the preferred vector type, we just return a valid (although potentially 'less friendly') vector type based on the type size. So, rather than asserting on an 'unexpected' 'Ty' in input, we conservatively return vector type <2 x double> if Ty is 16 bytes, or <4 x double> if Ty is 32 bytes. Differential Revision: http://reviews.llvm.org/D10190 llvm-svn: 238861
* CodeGen: Fix passing of classes with only one AVX vector member in AVX registersBenjamin Kramer2015-03-021-0/+15
isSingleElementStruct was a bit too tight in its definition of struct so we got a mismatch between classify() and the actual code generation. To make matters worse the code in GetByteVectorType still defaulted to <2 x double> if it encountered a type it didn't know, making this a silent miscompilation (PR22753). Completely remove the "preferred type" stuff from GetByteVectorType and make it fail an assertion if someone tries to use it with a type not suitable for a vector register. llvm-svn: 230971
OpenPOWER on IntegriCloud