diff options
-rw-r--r-- | lib/CodeGen/TargetInfo.cpp | 2 | ||||
-rw-r--r-- | test/CodeGenCXX/x86_64-arguments-avx.cpp | 9 |
2 files changed, 11 insertions, 0 deletions
diff --git a/lib/CodeGen/TargetInfo.cpp b/lib/CodeGen/TargetInfo.cpp index e5ba200e1c..dbb9e8d903 100644 --- a/lib/CodeGen/TargetInfo.cpp +++ b/lib/CodeGen/TargetInfo.cpp @@ -2094,11 +2094,13 @@ void X86_64ABIInfo::classify(QualType Ty, uint64_t OffsetBase, // if (Size > 128 && getContext().getTypeSize(i->getType()) != 256) { Lo = Memory; + postMerge(Size, Lo, Hi); return; } // Note, skip this test for bit-fields, see below. if (!BitField && Offset % getContext().getTypeAlign(i->getType())) { Lo = Memory; + postMerge(Size, Lo, Hi); return; } diff --git a/test/CodeGenCXX/x86_64-arguments-avx.cpp b/test/CodeGenCXX/x86_64-arguments-avx.cpp index 29e693451d..2933d9445b 100644 --- a/test/CodeGenCXX/x86_64-arguments-avx.cpp +++ b/test/CodeGenCXX/x86_64-arguments-avx.cpp @@ -50,3 +50,12 @@ UU2 PR23082(UU2 x) { return x; } } + +namespace test3 { +union U { + __attribute__((__vector_size__(32))) float f1; + int f2; +}; +// CHECK: define i32 @_ZN5test31fENS_1UE({{.*}}* byval align 32 +int f(U u) { return u.f2; } +} |