summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2017-12-31 07:38:30 +0000
committerCraig Topper <craig.topper@intel.com>2017-12-31 07:38:30 +0000
commit7ba1b768542023e32f9f470bc3d61d27f54348ee (patch)
tree917819beb9792c3efab4076a3f1b97a8af6ae12c /llvm/test/CodeGen
parent1d0e2e82bc0f87a6111ca70f255926def3645112 (diff)
downloadbcm5719-llvm-7ba1b768542023e32f9f470bc3d61d27f54348ee.tar.gz
bcm5719-llvm-7ba1b768542023e32f9f470bc3d61d27f54348ee.zip
[X86] Fix a crash when returning a <1 x i1> value>
llvm-svn: 321595
Diffstat (limited to 'llvm/test/CodeGen')
-rw-r--r--llvm/test/CodeGen/X86/avx512-calling-conv.ll19
1 files changed, 19 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/avx512-calling-conv.ll b/llvm/test/CodeGen/X86/avx512-calling-conv.ll
index 821c65bef06..5ea44c5ea2d 100644
--- a/llvm/test/CodeGen/X86/avx512-calling-conv.ll
+++ b/llvm/test/CodeGen/X86/avx512-calling-conv.ll
@@ -410,3 +410,22 @@ define i32 @test12(i32 %a1, i32 %a2, i32 %b1) {
%res1 = select i1 %cond, i32 %res, i32 0
ret i32 %res1
}
+
+define <1 x i1> @test13(<1 x i1>* %foo) {
+; ALL_X64-LABEL: test13:
+; ALL_X64: ## %bb.0:
+; ALL_X64-NEXT: movzbl (%rdi), %eax
+; ALL_X64-NEXT: andl $1, %eax
+; ALL_X64-NEXT: ## kill: def %al killed %al killed %eax
+; ALL_X64-NEXT: retq
+;
+; KNL_X32-LABEL: test13:
+; KNL_X32: ## %bb.0:
+; KNL_X32-NEXT: movl {{[0-9]+}}(%esp), %eax
+; KNL_X32-NEXT: movzbl (%eax), %eax
+; KNL_X32-NEXT: andl $1, %eax
+; KNL_X32-NEXT: ## kill: def %al killed %al killed %eax
+; KNL_X32-NEXT: retl
+ %bar = load <1 x i1>, <1 x i1>* %foo
+ ret <1 x i1> %bar
+}
OpenPOWER on IntegriCloud