From 27ef6eec41f28383581cd4ce9c7d64bba3e5a101 Mon Sep 17 00:00:00 2001 From: Elena Demikhovsky Date: Mon, 10 Feb 2014 07:02:39 +0000 Subject: AVX-512: Fixed extract_vector_elt for v16i1 and v8i1 vectors. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201066 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/X86/avx512-insert-extract.ll | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'test') diff --git a/test/CodeGen/X86/avx512-insert-extract.ll b/test/CodeGen/X86/avx512-insert-extract.ll index 64f2a19700..f8a84bb1f2 100644 --- a/test/CodeGen/X86/avx512-insert-extract.ll +++ b/test/CodeGen/X86/avx512-insert-extract.ll @@ -117,3 +117,20 @@ define <16 x i32> @test11(<16 x i32>%a, <16 x i32>%b) { %c = add <16 x i32>%b, %a ret <16 x i32>%c } + +;CHECK-LABEL: test12 +;CHECK: vpcmpgtq +;CKECK: kshiftlw $15 +;CKECK: kshiftrw $15 +;CHECK: kortestw +;CHECK: ret + +define i64 @test12(<16 x i64>%a, <16 x i64>%b, i64 %a1, i64 %b1) { + + %cmpvector_func.i = icmp slt <16 x i64> %a, %b + %extract24vector_func.i = extractelement <16 x i1> %cmpvector_func.i, i32 0 + %res = select i1 %extract24vector_func.i, i64 %a1, i64 %b1 + ret i64 %res +} + + -- cgit v1.2.3