aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/AArch64
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2018-08-29 17:50:33 +0000
committerDimitry Andric <dim@FreeBSD.org>2018-08-29 17:50:33 +0000
commit8568f9cb5af587ccee4088af3e2d617b3c30d403 (patch)
tree38ef3950af2e183a6c1c23947e35e837fce15a9a /test/CodeGen/AArch64
parentd0a9cbdae159210824ddf2da138e2dcaecbe1cd4 (diff)
Notes
Diffstat (limited to 'test/CodeGen/AArch64')
-rw-r--r--test/CodeGen/AArch64/GlobalISel/irtranslator-duplicate-types-param.ll15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/CodeGen/AArch64/GlobalISel/irtranslator-duplicate-types-param.ll b/test/CodeGen/AArch64/GlobalISel/irtranslator-duplicate-types-param.ll
new file mode 100644
index 000000000000..c20b855c8e7a
--- /dev/null
+++ b/test/CodeGen/AArch64/GlobalISel/irtranslator-duplicate-types-param.ll
@@ -0,0 +1,15 @@
+; RUN: llc -O0 -o - -verify-machineinstrs %s | FileCheck %s
+target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
+target triple = "aarch64-unknown-linux-gnu"
+
+; Check we don't crash due to encountering the same struct param type twice.
+; CHECK-LABEL: param_two_struct
+; CHECK: add
+; CHECK: ret
+define i64 @param_two_struct([2 x i64] %t.coerce, [2 x i64] %s.coerce) {
+entry:
+ %t.coerce.fca.0.extract = extractvalue [2 x i64] %t.coerce, 0
+ %s.coerce.fca.1.extract = extractvalue [2 x i64] %s.coerce, 1
+ %add = add nsw i64 %s.coerce.fca.1.extract, %t.coerce.fca.0.extract
+ ret i64 %add
+}