summaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/x86_64-arguments-avx.cpp
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2015-07-08 05:07:05 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2015-07-08 05:07:05 +0000
commit5ba945b1f474847c2f814746f7dbe47040d09756 (patch)
treef692ce06e680e976ebf2c0016f875b7749023a12 /test/CodeGenCXX/x86_64-arguments-avx.cpp
parenta9812b841c5199814ccdcaa37d98a1a34af28cc8 (diff)
downloadclang-5ba945b1f474847c2f814746f7dbe47040d09756.tar.gz
[CodeGen] Don't crash classifying a union of an AVX vector and an int
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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241666 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/x86_64-arguments-avx.cpp')
-rw-r--r--test/CodeGenCXX/x86_64-arguments-avx.cpp9
1 files changed, 9 insertions, 0 deletions
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; }
+}