1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=avx2 | FileCheck %s
4 ; Verify that the backend correctly combines AVX2 builtin intrinsics.
7 define <16 x i16> @test_x86_avx2_pblendw(<16 x i16> %a0) {
8 ; CHECK-LABEL: test_x86_avx2_pblendw:
11 %res = call <16 x i16> @llvm.x86.avx2.pblendw(<16 x i16> %a0, <16 x i16> %a0, i32 7)
15 define <4 x i32> @test_x86_avx2_pblendd_128(<4 x i32> %a0) {
16 ; CHECK-LABEL: test_x86_avx2_pblendd_128:
19 %res = call <4 x i32> @llvm.x86.avx2.pblendd.128(<4 x i32> %a0, <4 x i32> %a0, i32 7)
23 define <8 x i32> @test_x86_avx2_pblendd_256(<8 x i32> %a0) {
24 ; CHECK-LABEL: test_x86_avx2_pblendd_256:
27 %res = call <8 x i32> @llvm.x86.avx2.pblendd.256(<8 x i32> %a0, <8 x i32> %a0, i32 7)
31 define <16 x i16> @test2_x86_avx2_pblendw(<16 x i16> %a0, <16 x i16> %a1) {
32 ; CHECK-LABEL: test2_x86_avx2_pblendw:
35 %res = call <16 x i16> @llvm.x86.avx2.pblendw(<16 x i16> %a0, <16 x i16> %a1, i32 0)
39 define <4 x i32> @test2_x86_avx2_pblendd_128(<4 x i32> %a0, <4 x i32> %a1) {
40 ; CHECK-LABEL: test2_x86_avx2_pblendd_128:
43 %res = call <4 x i32> @llvm.x86.avx2.pblendd.128(<4 x i32> %a0, <4 x i32> %a1, i32 0)
47 define <8 x i32> @test2_x86_avx2_pblendd_256(<8 x i32> %a0, <8 x i32> %a1) {
48 ; CHECK-LABEL: test2_x86_avx2_pblendd_256:
51 %res = call <8 x i32> @llvm.x86.avx2.pblendd.256(<8 x i32> %a0, <8 x i32> %a1, i32 0)
55 define <16 x i16> @test3_x86_avx2_pblendw(<16 x i16> %a0, <16 x i16> %a1) {
56 ; CHECK-LABEL: test3_x86_avx2_pblendw:
58 ; CHECK-NEXT: vmovaps %ymm1, %ymm0
60 %res = call <16 x i16> @llvm.x86.avx2.pblendw(<16 x i16> %a0, <16 x i16> %a1, i32 -1)
64 define <4 x i32> @test3_x86_avx2_pblendd_128(<4 x i32> %a0, <4 x i32> %a1) {
65 ; CHECK-LABEL: test3_x86_avx2_pblendd_128:
67 ; CHECK-NEXT: vmovaps %xmm1, %xmm0
69 %res = call <4 x i32> @llvm.x86.avx2.pblendd.128(<4 x i32> %a0, <4 x i32> %a1, i32 -1)
73 define <8 x i32> @test3_x86_avx2_pblendd_256(<8 x i32> %a0, <8 x i32> %a1) {
74 ; CHECK-LABEL: test3_x86_avx2_pblendd_256:
76 ; CHECK-NEXT: vmovaps %ymm1, %ymm0
78 %res = call <8 x i32> @llvm.x86.avx2.pblendd.256(<8 x i32> %a0, <8 x i32> %a1, i32 -1)
82 declare <16 x i16> @llvm.x86.avx2.pblendw(<16 x i16>, <16 x i16>, i32)
83 declare <4 x i32> @llvm.x86.avx2.pblendd.128(<4 x i32>, <4 x i32>, i32)
84 declare <8 x i32> @llvm.x86.avx2.pblendd.256(<8 x i32>, <8 x i32>, i32)