diff options
Diffstat (limited to 'llvm/test/CodeGen')
| -rw-r--r-- | llvm/test/CodeGen/X86/avx512-insert-extract.ll | 25 | ||||
| -rw-r--r-- | llvm/test/CodeGen/X86/avx512-shuffle.ll | 8 |
2 files changed, 33 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/avx512-insert-extract.ll b/llvm/test/CodeGen/X86/avx512-insert-extract.ll index 530b92e484e..3f067401ed3 100644 --- a/llvm/test/CodeGen/X86/avx512-insert-extract.ll +++ b/llvm/test/CodeGen/X86/avx512-insert-extract.ll @@ -98,3 +98,28 @@ define i32 @test10(<16 x i32> %x, i32 %ind) nounwind { ret i32 %e } +;CHECK-LABEL: test11 +;CHECK: movl $260 +;CHECK: bextrl +;CHECK: movl $268 +;CHECK: bextrl +;CHECK: ret +define <16 x i32> @test11(<16 x i32>%a, <16 x i32>%b) { + %cmp_res = icmp ult <16 x i32> %a, %b + %ia = extractelement <16 x i1> %cmp_res, i32 4 + %ib = extractelement <16 x i1> %cmp_res, i32 12 + + br i1 %ia, label %A, label %B + + A: + ret <16 x i32>%b + B: + %c = add <16 x i32>%b, %a + br i1 %ib, label %C, label %D + C: + %c1 = sub <16 x i32>%c, %a + ret <16 x i32>%c1 + D: + %c2 = mul <16 x i32>%c, %a + ret <16 x i32>%c2 +} diff --git a/llvm/test/CodeGen/X86/avx512-shuffle.ll b/llvm/test/CodeGen/X86/avx512-shuffle.ll index f9186b643f7..c9e0c2b992d 100644 --- a/llvm/test/CodeGen/X86/avx512-shuffle.ll +++ b/llvm/test/CodeGen/X86/avx512-shuffle.ll @@ -215,4 +215,12 @@ define <16 x i32> @test24(<16 x i32> %a, <16 x i32> %b) nounwind { define <16 x i32> @test25(<16 x i32> %a, <16 x i32> %b) nounwind { %c = shufflevector <16 x i32> %a, <16 x i32> %b, <16 x i32> <i32 0, i32 1, i32 19, i32 undef, i32 4, i32 5, i32 23, i32 undef, i32 8, i32 9, i32 27, i32 undef, i32 12, i32 13, i32 undef, i32 undef> ret <16 x i32> %c +} + +; CHECK-LABEL: @test26 +; CHECK: vmovshdup +; CHECK: ret +define <16 x i32> @test26(<16 x i32> %a) nounwind { + %c = shufflevector <16 x i32> %a, <16 x i32> undef, <16 x i32> <i32 1, i32 1, i32 3, i32 3, i32 5, i32 5, i32 7, i32 undef, i32 9, i32 9, i32 undef, i32 11, i32 13, i32 undef, i32 undef, i32 undef> + ret <16 x i32> %c }
\ No newline at end of file |

