1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -mtriple=i686-apple-darwin -mattr=+avx512f | FileCheck %s --check-prefix=DARWIN 2*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -mtriple=i686-pc-linux -mattr=+avx512f | FileCheck %s --check-prefix=LINUX 3*9880d681SAndroid Build Coastguard Worker 4*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: test_sse: 5*9880d681SAndroid Build Coastguard Worker; DARWIN-DAG: vpaddd %xmm1, %xmm0, %xmm0 6*9880d681SAndroid Build Coastguard Worker; DARWIN-DAG: vpaddd %xmm3, %xmm2, %xmm1 7*9880d681SAndroid Build Coastguard Worker; DARWIN: vpaddd %xmm1, %xmm0, %xmm0 8*9880d681SAndroid Build Coastguard Worker; LINUX-DAG: vpaddd %xmm1, %xmm0, %xmm0 9*9880d681SAndroid Build Coastguard Worker; LINUX-DAG: vpaddd {{[0-9]+}}(%e{{s|b}}p), %xmm2, %xmm1 10*9880d681SAndroid Build Coastguard Worker; LINUX: vpaddd %xmm1, %xmm0, %xmm0 11*9880d681SAndroid Build Coastguard Workerdefine <4 x i32> @test_sse(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c, <4 x i32> %d) nounwind { 12*9880d681SAndroid Build Coastguard Worker %r0 = add <4 x i32> %a, %b 13*9880d681SAndroid Build Coastguard Worker %r1 = add <4 x i32> %c, %d 14*9880d681SAndroid Build Coastguard Worker %ret = add <4 x i32> %r0, %r1 15*9880d681SAndroid Build Coastguard Worker ret <4 x i32> %ret 16*9880d681SAndroid Build Coastguard Worker} 17*9880d681SAndroid Build Coastguard Worker 18*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: test_avx: 19*9880d681SAndroid Build Coastguard Worker; DARWIN-DAG: vpaddd %ymm1, %ymm0, %ymm0 20*9880d681SAndroid Build Coastguard Worker; DARWIN-DAG: vpaddd %ymm3, %ymm2, %ymm1 21*9880d681SAndroid Build Coastguard Worker; DARWIN: vpaddd %ymm1, %ymm0, %ymm0 22*9880d681SAndroid Build Coastguard Worker; LINUX-DAG: vpaddd %ymm1, %ymm0, %ymm0 23*9880d681SAndroid Build Coastguard Worker; LINUX-DAG: vpaddd {{[0-9]+}}(%e{{s|b}}p), %ymm2, %ymm1 24*9880d681SAndroid Build Coastguard Worker; LINUX: vpaddd %ymm1, %ymm0, %ymm0 25*9880d681SAndroid Build Coastguard Workerdefine <8 x i32> @test_avx(<8 x i32> %a, <8 x i32> %b, <8 x i32> %c, <8 x i32> %d) nounwind { 26*9880d681SAndroid Build Coastguard Worker %r0 = add <8 x i32> %a, %b 27*9880d681SAndroid Build Coastguard Worker %r1 = add <8 x i32> %c, %d 28*9880d681SAndroid Build Coastguard Worker %ret = add <8 x i32> %r0, %r1 29*9880d681SAndroid Build Coastguard Worker ret <8 x i32> %ret 30*9880d681SAndroid Build Coastguard Worker} 31*9880d681SAndroid Build Coastguard Worker 32*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: test_avx512: 33*9880d681SAndroid Build Coastguard Worker; DARWIN-DAG: vpaddd %zmm1, %zmm0, %zmm0 34*9880d681SAndroid Build Coastguard Worker; DARWIN-DAG: vpaddd %zmm3, %zmm2, %zmm1 35*9880d681SAndroid Build Coastguard Worker; DARWIN: vpaddd %zmm1, %zmm0, %zmm0 36*9880d681SAndroid Build Coastguard Worker; LINUX-DAG: vpaddd %zmm1, %zmm0, %zmm0 37*9880d681SAndroid Build Coastguard Worker; LINUX-DAG: vpaddd {{[0-9]+}}(%e{{s|b}}p), %zmm2, %zmm1 38*9880d681SAndroid Build Coastguard Worker; LINUX: vpaddd %zmm1, %zmm0, %zmm0 39*9880d681SAndroid Build Coastguard Workerdefine <16 x i32> @test_avx512(<16 x i32> %a, <16 x i32> %b, <16 x i32> %c, <16 x i32> %d) nounwind { 40*9880d681SAndroid Build Coastguard Worker %r0 = add <16 x i32> %a, %b 41*9880d681SAndroid Build Coastguard Worker %r1 = add <16 x i32> %c, %d 42*9880d681SAndroid Build Coastguard Worker %ret = add <16 x i32> %r0, %r1 43*9880d681SAndroid Build Coastguard Worker ret <16 x i32> %ret 44*9880d681SAndroid Build Coastguard Worker} 45