aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-12-11 19:50:50 +0000
committerDan Gohman <gohman@apple.com>2009-12-11 19:50:50 +0000
commita4f9cc4e55fa12ddff95c2e9d0091077797f0b22 (patch)
tree888a2d65b83d2918241c37bdb8698abdbb969b50 /test/CodeGen
parent817a46454aa22b80069157a2b02717b7edfd9cbb (diff)
Fix the result type of SELECT nodes lowered from Select instructions with
aggregate return values. This fixes PR5754. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91145 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
-rw-r--r--test/CodeGen/X86/select-aggregate.ll15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/CodeGen/X86/select-aggregate.ll b/test/CodeGen/X86/select-aggregate.ll
new file mode 100644
index 0000000000..fba6a59c2d
--- /dev/null
+++ b/test/CodeGen/X86/select-aggregate.ll
@@ -0,0 +1,15 @@
+; RUN: llc < %s -march=x86-64 | FileCheck %s
+; PR5754
+
+; CHECK: cmovne %rdi, %rsi
+; CHECK: movl (%rsi), %eax
+
+%0 = type { i64, i32 }
+
+define i32 @foo(%0* %p, %0* %q, i1 %r) nounwind {
+ %t0 = load %0* %p
+ %t1 = load %0* %q
+ %t4 = select i1 %r, %0 %t0, %0 %t1
+ %t5 = extractvalue %0 %t4, 1
+ ret i32 %t5
+}