diff options
author | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2011-07-12 01:27:38 +0000 |
---|---|---|
committer | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2011-07-12 01:27:38 +0000 |
commit | 75541d00e0b90e0c01ba129a13fcccebbf41978d (patch) | |
tree | 3f3e9019ba8c8104e9c7b77f3c9d7eb58efc98f1 /clang/lib/CodeGen/TargetInfo.cpp | |
parent | 7475113d746deebd4a7baefe1b9c716efd3c6170 (diff) | |
download | bcm5719-llvm-75541d00e0b90e0c01ba129a13fcccebbf41978d.tar.gz bcm5719-llvm-75541d00e0b90e0c01ba129a13fcccebbf41978d.zip |
Do the same as r134946 for arrays. Add more testcases for avx x86_64 arg
passing.
llvm-svn: 134951
Diffstat (limited to 'clang/lib/CodeGen/TargetInfo.cpp')
-rw-r--r-- | clang/lib/CodeGen/TargetInfo.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp index 7c850afbf8f..6d5e38daa89 100644 --- a/clang/lib/CodeGen/TargetInfo.cpp +++ b/clang/lib/CodeGen/TargetInfo.cpp @@ -1198,6 +1198,13 @@ void X86_64ABIInfo::classify(QualType Ty, uint64_t OffsetBase, Current = NoClass; uint64_t EltSize = getContext().getTypeSize(AT->getElementType()); uint64_t ArraySize = AT->getSize().getZExtValue(); + + // The only case a 256-bit wide vector could be used is when the array + // contains a single 256-bit element. Since Lo and Hi logic isn't extended + // to work for sizes wider than 128, early check and fallback to memory. + if (Size > 128 && EltSize != 256) + return; + for (uint64_t i=0, Offset=OffsetBase; i<ArraySize; ++i, Offset += EltSize) { Class FieldLo, FieldHi; classify(AT->getElementType(), Offset, FieldLo, FieldHi); |