blob: 51dc5e102ff1578aa59144b24d37e4623ba23cf3 [file] [log] [blame]
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=x86-64 -mattr=+ssse3 | FileCheck %s --check-prefix=CHECK --check-prefix=GENERIC
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=atom | FileCheck %s --check-prefix=CHECK --check-prefix=ATOM
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=slm | FileCheck %s --check-prefix=CHECK --check-prefix=SLM
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=sandybridge | FileCheck %s --check-prefix=CHECK --check-prefix=SANDY
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=ivybridge | FileCheck %s --check-prefix=CHECK --check-prefix=SANDY
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=haswell | FileCheck %s --check-prefix=CHECK --check-prefix=HASWELL
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=broadwell | FileCheck %s --check-prefix=CHECK --check-prefix=BROADWELL
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=skylake | FileCheck %s --check-prefix=CHECK --check-prefix=SKYLAKE
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=skx | FileCheck %s --check-prefix=CHECK --check-prefix=SKX
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=bdver2 | FileCheck %s --check-prefix=CHECK --check-prefix=BDVER2
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=btver2 | FileCheck %s --check-prefix=CHECK --check-prefix=BTVER2
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=znver1 | FileCheck %s --check-prefix=CHECK --check-prefix=ZNVER1
define i64 @test_cvtpd2pi(<2 x double> %a0, <2 x double>* %a1) optsize {
; GENERIC-LABEL: test_cvtpd2pi:
; GENERIC: # %bb.0:
; GENERIC-NEXT: cvtpd2pi (%rdi), %mm0 # sched: [10:1.00]
; GENERIC-NEXT: cvtpd2pi %xmm0, %mm1 # sched: [4:1.00]
; GENERIC-NEXT: por %mm1, %mm0 # sched: [1:0.33]
; GENERIC-NEXT: movq %mm0, %rax # sched: [2:1.00]
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_cvtpd2pi:
; ATOM: # %bb.0:
; ATOM-NEXT: cvtpd2pi (%rdi), %mm0 # sched: [8:4.00]
; ATOM-NEXT: cvtpd2pi %xmm0, %mm1 # sched: [7:3.50]
; ATOM-NEXT: por %mm1, %mm0 # sched: [1:0.50]
; ATOM-NEXT: movq %mm0, %rax # sched: [3:3.00]
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_cvtpd2pi:
; SLM: # %bb.0:
; SLM-NEXT: cvtpd2pi (%rdi), %mm1 # sched: [7:1.00]
; SLM-NEXT: cvtpd2pi %xmm0, %mm0 # sched: [4:0.50]
; SLM-NEXT: por %mm0, %mm1 # sched: [1:0.50]
; SLM-NEXT: movq %mm1, %rax # sched: [1:0.50]
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_cvtpd2pi:
; SANDY: # %bb.0:
; SANDY-NEXT: cvtpd2pi (%rdi), %mm0 # sched: [10:1.00]
; SANDY-NEXT: cvtpd2pi %xmm0, %mm1 # sched: [4:1.00]
; SANDY-NEXT: por %mm1, %mm0 # sched: [1:0.33]
; SANDY-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_cvtpd2pi:
; HASWELL: # %bb.0:
; HASWELL-NEXT: cvtpd2pi (%rdi), %mm0 # sched: [10:1.00]
; HASWELL-NEXT: cvtpd2pi %xmm0, %mm1 # sched: [4:1.00]
; HASWELL-NEXT: por %mm1, %mm0 # sched: [1:0.33]
; HASWELL-NEXT: movq %mm0, %rax # sched: [1:1.00]
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_cvtpd2pi:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: cvtpd2pi %xmm0, %mm0 # sched: [4:1.00]
; BROADWELL-NEXT: cvtpd2pi (%rdi), %mm1 # sched: [9:1.00]
; BROADWELL-NEXT: por %mm0, %mm1 # sched: [1:0.33]
; BROADWELL-NEXT: movq %mm1, %rax # sched: [1:1.00]
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_cvtpd2pi:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: cvtpd2pi %xmm0, %mm0 # sched: [5:1.00]
; SKYLAKE-NEXT: cvtpd2pi (%rdi), %mm1 # sched: [11:1.00]
; SKYLAKE-NEXT: por %mm0, %mm1 # sched: [1:0.50]
; SKYLAKE-NEXT: movq %mm1, %rax # sched: [2:1.00]
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_cvtpd2pi:
; SKX: # %bb.0:
; SKX-NEXT: cvtpd2pi %xmm0, %mm0 # sched: [5:1.00]
; SKX-NEXT: cvtpd2pi (%rdi), %mm1 # sched: [11:1.00]
; SKX-NEXT: por %mm0, %mm1 # sched: [1:0.50]
; SKX-NEXT: movq %mm1, %rax # sched: [2:1.00]
; SKX-NEXT: retq # sched: [7:1.00]
;
; BDVER2-LABEL: test_cvtpd2pi:
; BDVER2: # %bb.0:
; BDVER2-NEXT: cvtpd2pi (%rdi), %mm1 # sched: [13:1.00]
; BDVER2-NEXT: cvtpd2pi %xmm0, %mm0 # sched: [6:1.00]
; BDVER2-NEXT: por %mm0, %mm1 # sched: [2:0.50]
; BDVER2-NEXT: movq %mm1, %rax # sched: [10:1.00]
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_cvtpd2pi:
; BTVER2: # %bb.0:
; BTVER2-NEXT: cvtpd2pi (%rdi), %mm1 # sched: [8:1.00]
; BTVER2-NEXT: cvtpd2pi %xmm0, %mm0 # sched: [3:1.00]
; BTVER2-NEXT: por %mm0, %mm1 # sched: [1:0.50]
; BTVER2-NEXT: movq %mm1, %rax # sched: [4:1.00]
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_cvtpd2pi:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: cvtpd2pi (%rdi), %mm1 # sched: [12:1.00]
; ZNVER1-NEXT: cvtpd2pi %xmm0, %mm0 # sched: [4:1.00]
; ZNVER1-NEXT: por %mm0, %mm1 # sched: [1:0.25]
; ZNVER1-NEXT: movq %mm1, %rax # sched: [2:1.00]
; ZNVER1-NEXT: retq # sched: [1:0.50]
%1 = call x86_mmx @llvm.x86.sse.cvtpd2pi(<2 x double> %a0)
%2 = load <2 x double>, <2 x double> *%a1, align 16
%3 = call x86_mmx @llvm.x86.sse.cvtpd2pi(<2 x double> %2)
%4 = call x86_mmx @llvm.x86.mmx.por(x86_mmx %1, x86_mmx %3)
%5 = bitcast x86_mmx %4 to i64
ret i64 %5
}
declare x86_mmx @llvm.x86.sse.cvtpd2pi(<2 x double>) nounwind readnone
define <2 x double> @test_cvtpi2pd(x86_mmx %a0, x86_mmx* %a1) optsize {
; GENERIC-LABEL: test_cvtpi2pd:
; GENERIC: # %bb.0:
; GENERIC-NEXT: cvtpi2pd %mm0, %xmm1 # sched: [4:1.00]
; GENERIC-NEXT: cvtpi2pd (%rdi), %xmm0 # sched: [10:1.00]
; GENERIC-NEXT: addpd %xmm1, %xmm0 # sched: [3:1.00]
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_cvtpi2pd:
; ATOM: # %bb.0:
; ATOM-NEXT: cvtpi2pd (%rdi), %xmm0 # sched: [8:4.00]
; ATOM-NEXT: cvtpi2pd %mm0, %xmm1 # sched: [7:3.50]
; ATOM-NEXT: addpd %xmm1, %xmm0 # sched: [6:3.00]
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_cvtpi2pd:
; SLM: # %bb.0:
; SLM-NEXT: cvtpi2pd (%rdi), %xmm0 # sched: [7:1.00]
; SLM-NEXT: cvtpi2pd %mm0, %xmm1 # sched: [4:0.50]
; SLM-NEXT: addpd %xmm1, %xmm0 # sched: [3:1.00]
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_cvtpi2pd:
; SANDY: # %bb.0:
; SANDY-NEXT: cvtpi2pd %mm0, %xmm0 # sched: [4:1.00]
; SANDY-NEXT: cvtpi2pd (%rdi), %xmm1 # sched: [10:1.00]
; SANDY-NEXT: vaddpd %xmm1, %xmm0, %xmm0 # sched: [3:1.00]
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_cvtpi2pd:
; HASWELL: # %bb.0:
; HASWELL-NEXT: cvtpi2pd %mm0, %xmm0 # sched: [4:1.00]
; HASWELL-NEXT: cvtpi2pd (%rdi), %xmm1 # sched: [9:1.00]
; HASWELL-NEXT: vaddpd %xmm1, %xmm0, %xmm0 # sched: [3:1.00]
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_cvtpi2pd:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: cvtpi2pd (%rdi), %xmm0 # sched: [9:1.00]
; BROADWELL-NEXT: cvtpi2pd %mm0, %xmm1 # sched: [4:1.00]
; BROADWELL-NEXT: vaddpd %xmm0, %xmm1, %xmm0 # sched: [3:1.00]
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_cvtpi2pd:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: cvtpi2pd %mm0, %xmm0 # sched: [5:1.00]
; SKYLAKE-NEXT: cvtpi2pd (%rdi), %xmm1 # sched: [10:1.00]
; SKYLAKE-NEXT: vaddpd %xmm1, %xmm0, %xmm0 # sched: [4:0.50]
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_cvtpi2pd:
; SKX: # %bb.0:
; SKX-NEXT: cvtpi2pd %mm0, %xmm0 # sched: [4:0.50]
; SKX-NEXT: cvtpi2pd (%rdi), %xmm1 # sched: [9:0.50]
; SKX-NEXT: vaddpd %xmm1, %xmm0, %xmm0 # sched: [4:0.50]
; SKX-NEXT: retq # sched: [7:1.00]
;
; BDVER2-LABEL: test_cvtpi2pd:
; BDVER2: # %bb.0:
; BDVER2-NEXT: cvtpi2pd (%rdi), %xmm1 # sched: [13:1.00]
; BDVER2-NEXT: cvtpi2pd %mm0, %xmm0 # sched: [6:1.00]
; BDVER2-NEXT: vaddpd %xmm1, %xmm0, %xmm0 # sched: [5:1.00]
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_cvtpi2pd:
; BTVER2: # %bb.0:
; BTVER2-NEXT: cvtpi2pd (%rdi), %xmm1 # sched: [8:1.00]
; BTVER2-NEXT: cvtpi2pd %mm0, %xmm0 # sched: [3:1.00]
; BTVER2-NEXT: vaddpd %xmm1, %xmm0, %xmm0 # sched: [3:1.00]
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_cvtpi2pd:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: cvtpi2pd (%rdi), %xmm1 # sched: [12:1.00]
; ZNVER1-NEXT: cvtpi2pd %mm0, %xmm0 # sched: [3:1.00]
; ZNVER1-NEXT: vaddpd %xmm1, %xmm0, %xmm0 # sched: [3:1.00]
; ZNVER1-NEXT: retq # sched: [1:0.50]
%1 = call <2 x double> @llvm.x86.sse.cvtpi2pd(x86_mmx %a0)
%2 = load x86_mmx, x86_mmx *%a1, align 8
%3 = call <2 x double> @llvm.x86.sse.cvtpi2pd(x86_mmx %2)
%4 = fadd <2 x double> %1, %3
ret <2 x double> %4
}
declare <2 x double> @llvm.x86.sse.cvtpi2pd(x86_mmx) nounwind readnone
define <4 x float> @test_cvtpi2ps(x86_mmx %a0, x86_mmx* %a1, <4 x float> %a2, <4 x float> %a3) optsize {
; GENERIC-LABEL: test_cvtpi2ps:
; GENERIC: # %bb.0:
; GENERIC-NEXT: cvtpi2ps %mm0, %xmm0 # sched: [3:1.00]
; GENERIC-NEXT: cvtpi2ps (%rdi), %xmm1 # sched: [9:1.00]
; GENERIC-NEXT: addps %xmm1, %xmm0 # sched: [3:1.00]
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_cvtpi2ps:
; ATOM: # %bb.0:
; ATOM-NEXT: cvtpi2ps %mm0, %xmm0 # sched: [5:5.00]
; ATOM-NEXT: cvtpi2ps (%rdi), %xmm1 # sched: [5:5.00]
; ATOM-NEXT: addps %xmm1, %xmm0 # sched: [5:5.00]
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_cvtpi2ps:
; SLM: # %bb.0:
; SLM-NEXT: cvtpi2ps (%rdi), %xmm1 # sched: [7:1.00]
; SLM-NEXT: cvtpi2ps %mm0, %xmm0 # sched: [4:0.50]
; SLM-NEXT: addps %xmm1, %xmm0 # sched: [3:1.00]
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_cvtpi2ps:
; SANDY: # %bb.0:
; SANDY-NEXT: cvtpi2ps %mm0, %xmm0 # sched: [3:1.00]
; SANDY-NEXT: cvtpi2ps (%rdi), %xmm1 # sched: [9:1.00]
; SANDY-NEXT: vaddps %xmm1, %xmm0, %xmm0 # sched: [3:1.00]
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_cvtpi2ps:
; HASWELL: # %bb.0:
; HASWELL-NEXT: cvtpi2ps %mm0, %xmm0 # sched: [3:1.00]
; HASWELL-NEXT: cvtpi2ps (%rdi), %xmm1 # sched: [8:1.00]
; HASWELL-NEXT: vaddps %xmm1, %xmm0, %xmm0 # sched: [3:1.00]
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_cvtpi2ps:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: cvtpi2ps %mm0, %xmm0 # sched: [3:1.00]
; BROADWELL-NEXT: cvtpi2ps (%rdi), %xmm1 # sched: [8:1.00]
; BROADWELL-NEXT: vaddps %xmm1, %xmm0, %xmm0 # sched: [3:1.00]
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_cvtpi2ps:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: cvtpi2ps %mm0, %xmm0 # sched: [6:2.00]
; SKYLAKE-NEXT: cvtpi2ps (%rdi), %xmm1 # sched: [9:1.00]
; SKYLAKE-NEXT: vaddps %xmm1, %xmm0, %xmm0 # sched: [4:0.50]
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_cvtpi2ps:
; SKX: # %bb.0:
; SKX-NEXT: cvtpi2ps %mm0, %xmm0 # sched: [6:2.00]
; SKX-NEXT: cvtpi2ps (%rdi), %xmm1 # sched: [9:1.00]
; SKX-NEXT: vaddps %xmm1, %xmm0, %xmm0 # sched: [4:0.50]
; SKX-NEXT: retq # sched: [7:1.00]
;
; BDVER2-LABEL: test_cvtpi2ps:
; BDVER2: # %bb.0:
; BDVER2-NEXT: cvtpi2ps (%rdi), %xmm1 # sched: [9:1.00]
; BDVER2-NEXT: cvtpi2ps %mm0, %xmm0 # sched: [4:1.00]
; BDVER2-NEXT: vaddps %xmm1, %xmm0, %xmm0 # sched: [5:1.00]
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_cvtpi2ps:
; BTVER2: # %bb.0:
; BTVER2-NEXT: cvtpi2ps (%rdi), %xmm1 # sched: [8:1.00]
; BTVER2-NEXT: cvtpi2ps %mm0, %xmm0 # sched: [3:1.00]
; BTVER2-NEXT: vaddps %xmm1, %xmm0, %xmm0 # sched: [3:1.00]
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_cvtpi2ps:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: cvtpi2ps (%rdi), %xmm1 # sched: [12:1.00]
; ZNVER1-NEXT: cvtpi2ps %mm0, %xmm0 # sched: [5:1.00]
; ZNVER1-NEXT: vaddps %xmm1, %xmm0, %xmm0 # sched: [3:1.00]
; ZNVER1-NEXT: retq # sched: [1:0.50]
%1 = call <4 x float> @llvm.x86.sse.cvtpi2ps(<4 x float> %a2, x86_mmx %a0)
%2 = load x86_mmx, x86_mmx *%a1, align 8
%3 = call <4 x float> @llvm.x86.sse.cvtpi2ps(<4 x float> %a3, x86_mmx %2)
%4 = fadd <4 x float> %1, %3
ret <4 x float> %4
}
declare <4 x float> @llvm.x86.sse.cvtpi2ps(<4 x float>, x86_mmx) nounwind readnone
define i64 @test_cvtps2pi(<4 x float> %a0, <4 x float>* %a1) optsize {
; GENERIC-LABEL: test_cvtps2pi:
; GENERIC: # %bb.0:
; GENERIC-NEXT: cvtps2pi %xmm0, %mm0 # sched: [3:1.00]
; GENERIC-NEXT: cvtps2pi (%rdi), %mm1 # sched: [9:1.00]
; GENERIC-NEXT: por %mm0, %mm1 # sched: [1:0.33]
; GENERIC-NEXT: movq %mm1, %rax # sched: [2:1.00]
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_cvtps2pi:
; ATOM: # %bb.0:
; ATOM-NEXT: cvtps2pi %xmm0, %mm0 # sched: [5:5.00]
; ATOM-NEXT: cvtps2pi (%rdi), %mm1 # sched: [5:5.00]
; ATOM-NEXT: por %mm0, %mm1 # sched: [1:0.50]
; ATOM-NEXT: movq %mm1, %rax # sched: [3:3.00]
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_cvtps2pi:
; SLM: # %bb.0:
; SLM-NEXT: cvtps2pi (%rdi), %mm1 # sched: [7:1.00]
; SLM-NEXT: cvtps2pi %xmm0, %mm0 # sched: [4:0.50]
; SLM-NEXT: por %mm0, %mm1 # sched: [1:0.50]
; SLM-NEXT: movq %mm1, %rax # sched: [1:0.50]
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_cvtps2pi:
; SANDY: # %bb.0:
; SANDY-NEXT: cvtps2pi %xmm0, %mm0 # sched: [3:1.00]
; SANDY-NEXT: cvtps2pi (%rdi), %mm1 # sched: [9:1.00]
; SANDY-NEXT: por %mm0, %mm1 # sched: [1:0.33]
; SANDY-NEXT: movq %mm1, %rax # sched: [2:1.00]
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_cvtps2pi:
; HASWELL: # %bb.0:
; HASWELL-NEXT: cvtps2pi %xmm0, %mm0 # sched: [4:1.00]
; HASWELL-NEXT: cvtps2pi (%rdi), %mm1 # sched: [8:1.00]
; HASWELL-NEXT: por %mm0, %mm1 # sched: [1:0.33]
; HASWELL-NEXT: movq %mm1, %rax # sched: [1:1.00]
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_cvtps2pi:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: cvtps2pi %xmm0, %mm0 # sched: [4:1.00]
; BROADWELL-NEXT: cvtps2pi (%rdi), %mm1 # sched: [8:1.00]
; BROADWELL-NEXT: por %mm0, %mm1 # sched: [1:0.33]
; BROADWELL-NEXT: movq %mm1, %rax # sched: [1:1.00]
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_cvtps2pi:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: cvtps2pi %xmm0, %mm0 # sched: [5:1.00]
; SKYLAKE-NEXT: cvtps2pi (%rdi), %mm1 # sched: [9:0.50]
; SKYLAKE-NEXT: por %mm0, %mm1 # sched: [1:0.50]
; SKYLAKE-NEXT: movq %mm1, %rax # sched: [2:1.00]
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_cvtps2pi:
; SKX: # %bb.0:
; SKX-NEXT: cvtps2pi %xmm0, %mm0 # sched: [5:1.00]
; SKX-NEXT: cvtps2pi (%rdi), %mm1 # sched: [9:0.50]
; SKX-NEXT: por %mm0, %mm1 # sched: [1:0.50]
; SKX-NEXT: movq %mm1, %rax # sched: [2:1.00]
; SKX-NEXT: retq # sched: [7:1.00]
;
; BDVER2-LABEL: test_cvtps2pi:
; BDVER2: # %bb.0:
; BDVER2-NEXT: cvtps2pi (%rdi), %mm1 # sched: [9:1.00]
; BDVER2-NEXT: cvtps2pi %xmm0, %mm0 # sched: [4:1.00]
; BDVER2-NEXT: por %mm0, %mm1 # sched: [2:0.50]
; BDVER2-NEXT: movq %mm1, %rax # sched: [10:1.00]
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_cvtps2pi:
; BTVER2: # %bb.0:
; BTVER2-NEXT: cvtps2pi (%rdi), %mm1 # sched: [8:1.00]
; BTVER2-NEXT: cvtps2pi %xmm0, %mm0 # sched: [3:1.00]
; BTVER2-NEXT: por %mm0, %mm1 # sched: [1:0.50]
; BTVER2-NEXT: movq %mm1, %rax # sched: [4:1.00]
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_cvtps2pi:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: cvtps2pi (%rdi), %mm1 # sched: [12:1.00]
; ZNVER1-NEXT: cvtps2pi %xmm0, %mm0 # sched: [4:1.00]
; ZNVER1-NEXT: por %mm0, %mm1 # sched: [1:0.25]
; ZNVER1-NEXT: movq %mm1, %rax # sched: [2:1.00]
; ZNVER1-NEXT: retq # sched: [1:0.50]
%1 = call x86_mmx @llvm.x86.sse.cvtps2pi(<4 x float> %a0)
%2 = load <4 x float>, <4 x float> *%a1, align 16
%3 = call x86_mmx @llvm.x86.sse.cvtps2pi(<4 x float> %2)
%4 = call x86_mmx @llvm.x86.mmx.por(x86_mmx %1, x86_mmx %3)
%5 = bitcast x86_mmx %4 to i64
ret i64 %5
}
declare x86_mmx @llvm.x86.sse.cvtps2pi(<4 x float>) nounwind readnone
define i64 @test_cvttpd2pi(<2 x double> %a0, <2 x double>* %a1) optsize {
; GENERIC-LABEL: test_cvttpd2pi:
; GENERIC: # %bb.0:
; GENERIC-NEXT: cvttpd2pi (%rdi), %mm0 # sched: [10:1.00]
; GENERIC-NEXT: cvttpd2pi %xmm0, %mm1 # sched: [4:1.00]
; GENERIC-NEXT: por %mm1, %mm0 # sched: [1:0.33]
; GENERIC-NEXT: movq %mm0, %rax # sched: [2:1.00]
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_cvttpd2pi:
; ATOM: # %bb.0:
; ATOM-NEXT: cvttpd2pi (%rdi), %mm0 # sched: [8:4.00]
; ATOM-NEXT: cvttpd2pi %xmm0, %mm1 # sched: [7:3.50]
; ATOM-NEXT: por %mm1, %mm0 # sched: [1:0.50]
; ATOM-NEXT: movq %mm0, %rax # sched: [3:3.00]
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_cvttpd2pi:
; SLM: # %bb.0:
; SLM-NEXT: cvttpd2pi (%rdi), %mm1 # sched: [7:1.00]
; SLM-NEXT: cvttpd2pi %xmm0, %mm0 # sched: [4:0.50]
; SLM-NEXT: por %mm0, %mm1 # sched: [1:0.50]
; SLM-NEXT: movq %mm1, %rax # sched: [1:0.50]
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_cvttpd2pi:
; SANDY: # %bb.0:
; SANDY-NEXT: cvttpd2pi (%rdi), %mm0 # sched: [10:1.00]
; SANDY-NEXT: cvttpd2pi %xmm0, %mm1 # sched: [4:1.00]
; SANDY-NEXT: por %mm1, %mm0 # sched: [1:0.33]
; SANDY-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_cvttpd2pi:
; HASWELL: # %bb.0:
; HASWELL-NEXT: cvttpd2pi (%rdi), %mm0 # sched: [10:1.00]
; HASWELL-NEXT: cvttpd2pi %xmm0, %mm1 # sched: [4:1.00]
; HASWELL-NEXT: por %mm1, %mm0 # sched: [1:0.33]
; HASWELL-NEXT: movq %mm0, %rax # sched: [1:1.00]
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_cvttpd2pi:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: cvttpd2pi %xmm0, %mm0 # sched: [4:1.00]
; BROADWELL-NEXT: cvttpd2pi (%rdi), %mm1 # sched: [9:1.00]
; BROADWELL-NEXT: por %mm0, %mm1 # sched: [1:0.33]
; BROADWELL-NEXT: movq %mm1, %rax # sched: [1:1.00]
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_cvttpd2pi:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: cvttpd2pi %xmm0, %mm0 # sched: [5:1.00]
; SKYLAKE-NEXT: cvttpd2pi (%rdi), %mm1 # sched: [11:1.00]
; SKYLAKE-NEXT: por %mm0, %mm1 # sched: [1:0.50]
; SKYLAKE-NEXT: movq %mm1, %rax # sched: [2:1.00]
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_cvttpd2pi:
; SKX: # %bb.0:
; SKX-NEXT: cvttpd2pi %xmm0, %mm0 # sched: [5:1.00]
; SKX-NEXT: cvttpd2pi (%rdi), %mm1 # sched: [11:1.00]
; SKX-NEXT: por %mm0, %mm1 # sched: [1:0.50]
; SKX-NEXT: movq %mm1, %rax # sched: [2:1.00]
; SKX-NEXT: retq # sched: [7:1.00]
;
; BDVER2-LABEL: test_cvttpd2pi:
; BDVER2: # %bb.0:
; BDVER2-NEXT: cvttpd2pi (%rdi), %mm1 # sched: [13:1.00]
; BDVER2-NEXT: cvttpd2pi %xmm0, %mm0 # sched: [6:1.00]
; BDVER2-NEXT: por %mm0, %mm1 # sched: [2:0.50]
; BDVER2-NEXT: movq %mm1, %rax # sched: [10:1.00]
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_cvttpd2pi:
; BTVER2: # %bb.0:
; BTVER2-NEXT: cvttpd2pi (%rdi), %mm1 # sched: [8:1.00]
; BTVER2-NEXT: cvttpd2pi %xmm0, %mm0 # sched: [3:1.00]
; BTVER2-NEXT: por %mm0, %mm1 # sched: [1:0.50]
; BTVER2-NEXT: movq %mm1, %rax # sched: [4:1.00]
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_cvttpd2pi:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: cvttpd2pi (%rdi), %mm1 # sched: [12:1.00]
; ZNVER1-NEXT: cvttpd2pi %xmm0, %mm0 # sched: [4:1.00]
; ZNVER1-NEXT: por %mm0, %mm1 # sched: [1:0.25]
; ZNVER1-NEXT: movq %mm1, %rax # sched: [2:1.00]
; ZNVER1-NEXT: retq # sched: [1:0.50]
%1 = call x86_mmx @llvm.x86.sse.cvttpd2pi(<2 x double> %a0)
%2 = load <2 x double>, <2 x double> *%a1, align 16
%3 = call x86_mmx @llvm.x86.sse.cvttpd2pi(<2 x double> %2)
%4 = call x86_mmx @llvm.x86.mmx.por(x86_mmx %1, x86_mmx %3)
%5 = bitcast x86_mmx %4 to i64
ret i64 %5
}
declare x86_mmx @llvm.x86.sse.cvttpd2pi(<2 x double>) nounwind readnone
define i64 @test_cvttps2pi(<4 x float> %a0, <4 x float>* %a1) optsize {
; GENERIC-LABEL: test_cvttps2pi:
; GENERIC: # %bb.0:
; GENERIC-NEXT: cvttps2pi %xmm0, %mm0 # sched: [3:1.00]
; GENERIC-NEXT: cvttps2pi (%rdi), %mm1 # sched: [9:1.00]
; GENERIC-NEXT: por %mm0, %mm1 # sched: [1:0.33]
; GENERIC-NEXT: movq %mm1, %rax # sched: [2:1.00]
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_cvttps2pi:
; ATOM: # %bb.0:
; ATOM-NEXT: cvttps2pi %xmm0, %mm0 # sched: [5:5.00]
; ATOM-NEXT: cvttps2pi (%rdi), %mm1 # sched: [5:5.00]
; ATOM-NEXT: por %mm0, %mm1 # sched: [1:0.50]
; ATOM-NEXT: movq %mm1, %rax # sched: [3:3.00]
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_cvttps2pi:
; SLM: # %bb.0:
; SLM-NEXT: cvttps2pi (%rdi), %mm1 # sched: [7:1.00]
; SLM-NEXT: cvttps2pi %xmm0, %mm0 # sched: [4:0.50]
; SLM-NEXT: por %mm0, %mm1 # sched: [1:0.50]
; SLM-NEXT: movq %mm1, %rax # sched: [1:0.50]
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_cvttps2pi:
; SANDY: # %bb.0:
; SANDY-NEXT: cvttps2pi %xmm0, %mm0 # sched: [3:1.00]
; SANDY-NEXT: cvttps2pi (%rdi), %mm1 # sched: [9:1.00]
; SANDY-NEXT: por %mm0, %mm1 # sched: [1:0.33]
; SANDY-NEXT: movq %mm1, %rax # sched: [2:1.00]
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_cvttps2pi:
; HASWELL: # %bb.0:
; HASWELL-NEXT: cvttps2pi %xmm0, %mm0 # sched: [4:1.00]
; HASWELL-NEXT: cvttps2pi (%rdi), %mm1 # sched: [8:1.00]
; HASWELL-NEXT: por %mm0, %mm1 # sched: [1:0.33]
; HASWELL-NEXT: movq %mm1, %rax # sched: [1:1.00]
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_cvttps2pi:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: cvttps2pi %xmm0, %mm0 # sched: [4:1.00]
; BROADWELL-NEXT: cvttps2pi (%rdi), %mm1 # sched: [8:1.00]
; BROADWELL-NEXT: por %mm0, %mm1 # sched: [1:0.33]
; BROADWELL-NEXT: movq %mm1, %rax # sched: [1:1.00]
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_cvttps2pi:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: cvttps2pi %xmm0, %mm0 # sched: [5:1.00]
; SKYLAKE-NEXT: cvttps2pi (%rdi), %mm1 # sched: [9:0.50]
; SKYLAKE-NEXT: por %mm0, %mm1 # sched: [1:0.50]
; SKYLAKE-NEXT: movq %mm1, %rax # sched: [2:1.00]
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_cvttps2pi:
; SKX: # %bb.0:
; SKX-NEXT: cvttps2pi %xmm0, %mm0 # sched: [5:1.00]
; SKX-NEXT: cvttps2pi (%rdi), %mm1 # sched: [9:0.50]
; SKX-NEXT: por %mm0, %mm1 # sched: [1:0.50]
; SKX-NEXT: movq %mm1, %rax # sched: [2:1.00]
; SKX-NEXT: retq # sched: [7:1.00]
;
; BDVER2-LABEL: test_cvttps2pi:
; BDVER2: # %bb.0:
; BDVER2-NEXT: cvttps2pi (%rdi), %mm1 # sched: [9:1.00]
; BDVER2-NEXT: cvttps2pi %xmm0, %mm0 # sched: [4:1.00]
; BDVER2-NEXT: por %mm0, %mm1 # sched: [2:0.50]
; BDVER2-NEXT: movq %mm1, %rax # sched: [10:1.00]
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_cvttps2pi:
; BTVER2: # %bb.0:
; BTVER2-NEXT: cvttps2pi (%rdi), %mm1 # sched: [8:1.00]
; BTVER2-NEXT: cvttps2pi %xmm0, %mm0 # sched: [3:1.00]
; BTVER2-NEXT: por %mm0, %mm1 # sched: [1:0.50]
; BTVER2-NEXT: movq %mm1, %rax # sched: [4:1.00]
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_cvttps2pi:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: cvttps2pi (%rdi), %mm1 # sched: [12:1.00]
; ZNVER1-NEXT: cvttps2pi %xmm0, %mm0 # sched: [4:1.00]
; ZNVER1-NEXT: por %mm0, %mm1 # sched: [1:0.25]
; ZNVER1-NEXT: movq %mm1, %rax # sched: [2:1.00]
; ZNVER1-NEXT: retq # sched: [1:0.50]
%1 = call x86_mmx @llvm.x86.sse.cvttps2pi(<4 x float> %a0)
%2 = load <4 x float>, <4 x float> *%a1, align 16
%3 = call x86_mmx @llvm.x86.sse.cvttps2pi(<4 x float> %2)
%4 = call x86_mmx @llvm.x86.mmx.por(x86_mmx %1, x86_mmx %3)
%5 = bitcast x86_mmx %4 to i64
ret i64 %5
}
declare x86_mmx @llvm.x86.sse.cvttps2pi(<4 x float>) nounwind readnone
define void @test_emms() optsize {
; GENERIC-LABEL: test_emms:
; GENERIC: # %bb.0:
; GENERIC-NEXT: emms # sched: [31:10.33]
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_emms:
; ATOM: # %bb.0:
; ATOM-NEXT: emms # sched: [5:2.50]
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_emms:
; SLM: # %bb.0:
; SLM-NEXT: emms # sched: [10:5.00]
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_emms:
; SANDY: # %bb.0:
; SANDY-NEXT: emms # sched: [31:10.33]
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_emms:
; HASWELL: # %bb.0:
; HASWELL-NEXT: emms # sched: [31:10.00]
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_emms:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: emms # sched: [31:10.00]
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_emms:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: emms # sched: [10:4.50]
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_emms:
; SKX: # %bb.0:
; SKX-NEXT: emms # sched: [10:4.50]
; SKX-NEXT: retq # sched: [7:1.00]
;
; BDVER2-LABEL: test_emms:
; BDVER2: # %bb.0:
; BDVER2-NEXT: emms # sched: [2:0.50]
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_emms:
; BTVER2: # %bb.0:
; BTVER2-NEXT: emms # sched: [2:0.50]
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_emms:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: emms # sched: [2:0.25]
; ZNVER1-NEXT: retq # sched: [1:0.50]
call void @llvm.x86.mmx.emms()
ret void
}
declare void @llvm.x86.mmx.emms()
define void @test_maskmovq(x86_mmx %a0, x86_mmx %a1, i8* %a2) optsize {
; GENERIC-LABEL: test_maskmovq:
; GENERIC: # %bb.0:
; GENERIC-NEXT: maskmovq %mm1, %mm0 # sched: [1:1.00]
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_maskmovq:
; ATOM: # %bb.0:
; ATOM-NEXT: maskmovq %mm1, %mm0 # sched: [1:1.00]
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_maskmovq:
; SLM: # %bb.0:
; SLM-NEXT: maskmovq %mm1, %mm0 # sched: [1:1.00]
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_maskmovq:
; SANDY: # %bb.0:
; SANDY-NEXT: maskmovq %mm1, %mm0 # sched: [1:1.00]
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_maskmovq:
; HASWELL: # %bb.0:
; HASWELL-NEXT: maskmovq %mm1, %mm0 # sched: [1:1.00]
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_maskmovq:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: maskmovq %mm1, %mm0 # sched: [1:1.00]
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_maskmovq:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: maskmovq %mm1, %mm0 # sched: [1:1.00]
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_maskmovq:
; SKX: # %bb.0:
; SKX-NEXT: maskmovq %mm1, %mm0 # sched: [1:1.00]
; SKX-NEXT: retq # sched: [7:1.00]
;
; BDVER2-LABEL: test_maskmovq:
; BDVER2: # %bb.0:
; BDVER2-NEXT: maskmovq %mm1, %mm0 # sched: [2:0.50]
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_maskmovq:
; BTVER2: # %bb.0:
; BTVER2-NEXT: maskmovq %mm1, %mm0 # sched: [1:0.50]
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_maskmovq:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: maskmovq %mm1, %mm0 # sched: [100:0.25]
; ZNVER1-NEXT: retq # sched: [1:0.50]
call void @llvm.x86.mmx.maskmovq(x86_mmx %a0, x86_mmx %a1, i8* %a2)
ret void
}
declare void @llvm.x86.mmx.maskmovq(x86_mmx, x86_mmx, i8*) nounwind
define i32 @test_movd(x86_mmx %a0, i32 %a1, i32 *%a2) {
; GENERIC-LABEL: test_movd:
; GENERIC: # %bb.0:
; GENERIC-NEXT: movd %edi, %mm1 # sched: [1:1.00]
; GENERIC-NEXT: movd (%rsi), %mm2 # sched: [5:0.50]
; GENERIC-NEXT: paddd %mm1, %mm2 # sched: [3:1.00]
; GENERIC-NEXT: paddd %mm2, %mm0 # sched: [3:1.00]
; GENERIC-NEXT: movd %mm2, %ecx # sched: [2:1.00]
; GENERIC-NEXT: movd %mm0, %eax # sched: [2:1.00]
; GENERIC-NEXT: movl %ecx, (%rsi) # sched: [1:1.00]
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_movd:
; ATOM: # %bb.0:
; ATOM-NEXT: movd %edi, %mm1 # sched: [1:1.00]
; ATOM-NEXT: movd (%rsi), %mm2 # sched: [1:1.00]
; ATOM-NEXT: paddd %mm1, %mm2 # sched: [1:0.50]
; ATOM-NEXT: paddd %mm2, %mm0 # sched: [1:0.50]
; ATOM-NEXT: movd %mm2, %ecx # sched: [3:3.00]
; ATOM-NEXT: movd %mm0, %eax # sched: [3:3.00]
; ATOM-NEXT: movl %ecx, (%rsi) # sched: [1:1.00]
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_movd:
; SLM: # %bb.0:
; SLM-NEXT: movd (%rsi), %mm2 # sched: [3:1.00]
; SLM-NEXT: movd %edi, %mm1 # sched: [1:0.50]
; SLM-NEXT: paddd %mm1, %mm2 # sched: [1:0.50]
; SLM-NEXT: paddd %mm2, %mm0 # sched: [1:0.50]
; SLM-NEXT: movd %mm2, %ecx # sched: [1:0.50]
; SLM-NEXT: movd %mm0, %eax # sched: [1:0.50]
; SLM-NEXT: movl %ecx, (%rsi) # sched: [1:1.00]
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_movd:
; SANDY: # %bb.0:
; SANDY-NEXT: movd %edi, %mm1 # sched: [1:1.00]
; SANDY-NEXT: movd (%rsi), %mm2 # sched: [5:0.50]
; SANDY-NEXT: paddd %mm1, %mm2 # sched: [3:1.00]
; SANDY-NEXT: paddd %mm2, %mm0 # sched: [3:1.00]
; SANDY-NEXT: movd %mm2, %ecx # sched: [2:1.00]
; SANDY-NEXT: movd %mm0, %eax # sched: [2:1.00]
; SANDY-NEXT: movl %ecx, (%rsi) # sched: [1:1.00]
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_movd:
; HASWELL: # %bb.0:
; HASWELL-NEXT: movd %edi, %mm1 # sched: [1:1.00]
; HASWELL-NEXT: movd (%rsi), %mm2 # sched: [5:0.50]
; HASWELL-NEXT: paddd %mm1, %mm2 # sched: [1:0.50]
; HASWELL-NEXT: paddd %mm2, %mm0 # sched: [1:0.50]
; HASWELL-NEXT: movd %mm2, %ecx # sched: [1:1.00]
; HASWELL-NEXT: movd %mm0, %eax # sched: [1:1.00]
; HASWELL-NEXT: movl %ecx, (%rsi) # sched: [1:1.00]
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_movd:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: movd %edi, %mm1 # sched: [1:1.00]
; BROADWELL-NEXT: movd (%rsi), %mm2 # sched: [5:0.50]
; BROADWELL-NEXT: paddd %mm1, %mm2 # sched: [1:0.50]
; BROADWELL-NEXT: paddd %mm2, %mm0 # sched: [1:0.50]
; BROADWELL-NEXT: movd %mm2, %ecx # sched: [1:1.00]
; BROADWELL-NEXT: movd %mm0, %eax # sched: [1:1.00]
; BROADWELL-NEXT: movl %ecx, (%rsi) # sched: [1:1.00]
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_movd:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: movd %edi, %mm1 # sched: [1:1.00]
; SKYLAKE-NEXT: movd (%rsi), %mm2 # sched: [5:0.50]
; SKYLAKE-NEXT: paddd %mm1, %mm2 # sched: [1:0.50]
; SKYLAKE-NEXT: paddd %mm2, %mm0 # sched: [1:0.50]
; SKYLAKE-NEXT: movd %mm2, %ecx # sched: [2:1.00]
; SKYLAKE-NEXT: movd %mm0, %eax # sched: [2:1.00]
; SKYLAKE-NEXT: movl %ecx, (%rsi) # sched: [1:1.00]
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_movd:
; SKX: # %bb.0:
; SKX-NEXT: movd %edi, %mm1 # sched: [1:1.00]
; SKX-NEXT: movd (%rsi), %mm2 # sched: [5:0.50]
; SKX-NEXT: paddd %mm1, %mm2 # sched: [1:0.50]
; SKX-NEXT: paddd %mm2, %mm0 # sched: [1:0.50]
; SKX-NEXT: movd %mm2, %ecx # sched: [2:1.00]
; SKX-NEXT: movd %mm0, %eax # sched: [2:1.00]
; SKX-NEXT: movl %ecx, (%rsi) # sched: [1:1.00]
; SKX-NEXT: retq # sched: [7:1.00]
;
; BDVER2-LABEL: test_movd:
; BDVER2: # %bb.0:
; BDVER2-NEXT: movd %edi, %mm1 # sched: [10:0.50]
; BDVER2-NEXT: movd (%rsi), %mm2 # sched: [5:0.50]
; BDVER2-NEXT: paddd %mm1, %mm2 # sched: [2:0.50]
; BDVER2-NEXT: paddd %mm2, %mm0 # sched: [2:0.50]
; BDVER2-NEXT: movd %mm2, %ecx # sched: [10:1.00]
; BDVER2-NEXT: movd %mm0, %eax # sched: [10:1.00]
; BDVER2-NEXT: movl %ecx, (%rsi) # sched: [1:1.00]
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_movd:
; BTVER2: # %bb.0:
; BTVER2-NEXT: movd %edi, %mm1 # sched: [8:0.50]
; BTVER2-NEXT: movd (%rsi), %mm2 # sched: [5:1.00]
; BTVER2-NEXT: paddd %mm1, %mm2 # sched: [1:0.50]
; BTVER2-NEXT: paddd %mm2, %mm0 # sched: [1:0.50]
; BTVER2-NEXT: movd %mm2, %ecx # sched: [4:1.00]
; BTVER2-NEXT: movd %mm0, %eax # sched: [4:1.00]
; BTVER2-NEXT: movl %ecx, (%rsi) # sched: [1:1.00]
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_movd:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: movd (%rsi), %mm2 # sched: [8:0.50]
; ZNVER1-NEXT: movd %edi, %mm1 # sched: [3:1.00]
; ZNVER1-NEXT: paddd %mm1, %mm2 # sched: [1:0.25]
; ZNVER1-NEXT: paddd %mm2, %mm0 # sched: [1:0.25]
; ZNVER1-NEXT: movd %mm2, %ecx # sched: [2:1.00]
; ZNVER1-NEXT: movd %mm0, %eax # sched: [2:1.00]
; ZNVER1-NEXT: movl %ecx, (%rsi) # sched: [1:0.50]
; ZNVER1-NEXT: retq # sched: [1:0.50]
%1 = insertelement <2 x i32> undef, i32 %a1, i32 0
%2 = bitcast <2 x i32> %1 to x86_mmx
%3 = load i32, i32 *%a2
%4 = insertelement <2 x i32> undef, i32 %3, i32 0
%5 = bitcast <2 x i32> %4 to x86_mmx
%6 = call x86_mmx @llvm.x86.mmx.padd.d(x86_mmx %2, x86_mmx %5)
%7 = call x86_mmx @llvm.x86.mmx.padd.d(x86_mmx %a0, x86_mmx %6)
%8 = bitcast x86_mmx %6 to <2 x i32>
%9 = bitcast x86_mmx %7 to <2 x i32>
%10 = extractelement <2 x i32> %8, i32 0
%11 = extractelement <2 x i32> %9, i32 0
store i32 %10, i32* %a2
ret i32 %11
}
define i64 @test_movdq2q(<2 x i64> %a0) optsize {
; GENERIC-LABEL: test_movdq2q:
; GENERIC: # %bb.0:
; GENERIC-NEXT: movdq2q %xmm0, %mm0 # sched: [2:1.00]
; GENERIC-NEXT: paddd %mm0, %mm0 # sched: [3:1.00]
; GENERIC-NEXT: movq %mm0, %rax # sched: [2:1.00]
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_movdq2q:
; ATOM: # %bb.0:
; ATOM-NEXT: movdq2q %xmm0, %mm0 # sched: [1:0.50]
; ATOM-NEXT: paddd %mm0, %mm0 # sched: [1:0.50]
; ATOM-NEXT: movq %mm0, %rax # sched: [3:3.00]
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_movdq2q:
; SLM: # %bb.0:
; SLM-NEXT: movdq2q %xmm0, %mm0 # sched: [1:0.50]
; SLM-NEXT: paddd %mm0, %mm0 # sched: [1:0.50]
; SLM-NEXT: movq %mm0, %rax # sched: [1:0.50]
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_movdq2q:
; SANDY: # %bb.0:
; SANDY-NEXT: movdq2q %xmm0, %mm0 # sched: [2:1.00]
; SANDY-NEXT: paddd %mm0, %mm0 # sched: [3:1.00]
; SANDY-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_movdq2q:
; HASWELL: # %bb.0:
; HASWELL-NEXT: movdq2q %xmm0, %mm0 # sched: [2:0.67]
; HASWELL-NEXT: paddd %mm0, %mm0 # sched: [1:0.50]
; HASWELL-NEXT: movq %mm0, %rax # sched: [1:1.00]
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_movdq2q:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: movdq2q %xmm0, %mm0 # sched: [2:0.67]
; BROADWELL-NEXT: paddd %mm0, %mm0 # sched: [1:0.50]
; BROADWELL-NEXT: movq %mm0, %rax # sched: [1:1.00]
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_movdq2q:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: movdq2q %xmm0, %mm0 # sched: [2:1.00]
; SKYLAKE-NEXT: paddd %mm0, %mm0 # sched: [1:0.50]
; SKYLAKE-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_movdq2q:
; SKX: # %bb.0:
; SKX-NEXT: movdq2q %xmm0, %mm0 # sched: [2:1.00]
; SKX-NEXT: paddd %mm0, %mm0 # sched: [1:0.50]
; SKX-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SKX-NEXT: retq # sched: [7:1.00]
;
; BDVER2-LABEL: test_movdq2q:
; BDVER2: # %bb.0:
; BDVER2-NEXT: movdq2q %xmm0, %mm0 # sched: [2:0.50]
; BDVER2-NEXT: paddd %mm0, %mm0 # sched: [2:0.50]
; BDVER2-NEXT: movq %mm0, %rax # sched: [10:1.00]
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_movdq2q:
; BTVER2: # %bb.0:
; BTVER2-NEXT: movdq2q %xmm0, %mm0 # sched: [1:0.50]
; BTVER2-NEXT: paddd %mm0, %mm0 # sched: [1:0.50]
; BTVER2-NEXT: movq %mm0, %rax # sched: [4:1.00]
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_movdq2q:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: movdq2q %xmm0, %mm0 # sched: [1:0.25]
; ZNVER1-NEXT: paddd %mm0, %mm0 # sched: [1:0.25]
; ZNVER1-NEXT: movq %mm0, %rax # sched: [2:1.00]
; ZNVER1-NEXT: retq # sched: [1:0.50]
%1 = extractelement <2 x i64> %a0, i32 0
%2 = bitcast i64 %1 to x86_mmx
%3 = call x86_mmx @llvm.x86.mmx.padd.d(x86_mmx %2, x86_mmx %2)
%4 = bitcast x86_mmx %3 to i64
ret i64 %4
}
define void @test_movntq(x86_mmx* %a0, x86_mmx %a1) optsize {
; GENERIC-LABEL: test_movntq:
; GENERIC: # %bb.0:
; GENERIC-NEXT: movntq %mm0, (%rdi) # sched: [1:1.00]
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_movntq:
; ATOM: # %bb.0:
; ATOM-NEXT: movntq %mm0, (%rdi) # sched: [1:1.00]
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_movntq:
; SLM: # %bb.0:
; SLM-NEXT: movntq %mm0, (%rdi) # sched: [1:1.00]
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_movntq:
; SANDY: # %bb.0:
; SANDY-NEXT: movntq %mm0, (%rdi) # sched: [1:1.00]
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_movntq:
; HASWELL: # %bb.0:
; HASWELL-NEXT: movntq %mm0, (%rdi) # sched: [1:1.00]
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_movntq:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: movntq %mm0, (%rdi) # sched: [1:1.00]
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_movntq:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: movntq %mm0, (%rdi) # sched: [1:1.00]
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_movntq:
; SKX: # %bb.0:
; SKX-NEXT: movntq %mm0, (%rdi) # sched: [1:1.00]
; SKX-NEXT: retq # sched: [7:1.00]
;
; BDVER2-LABEL: test_movntq:
; BDVER2: # %bb.0:
; BDVER2-NEXT: movntq %mm0, (%rdi) # sched: [2:1.00]
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_movntq:
; BTVER2: # %bb.0:
; BTVER2-NEXT: movntq %mm0, (%rdi) # sched: [2:1.00]
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_movntq:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: movntq %mm0, (%rdi) # sched: [1:0.50]
; ZNVER1-NEXT: retq # sched: [1:0.50]
call void @llvm.x86.mmx.movnt.dq(x86_mmx* %a0, x86_mmx %a1)
ret void
}
declare void @llvm.x86.mmx.movnt.dq(x86_mmx*, x86_mmx) nounwind
define void @test_movq(i64 *%a0) {
; GENERIC-LABEL: test_movq:
; GENERIC: # %bb.0:
; GENERIC-NEXT: movq (%rdi), %mm0 # sched: [5:0.50]
; GENERIC-NEXT: paddd %mm0, %mm0 # sched: [3:1.00]
; GENERIC-NEXT: movq %mm0, (%rdi) # sched: [1:1.00]
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_movq:
; ATOM: # %bb.0:
; ATOM-NEXT: movq (%rdi), %mm0 # sched: [1:1.00]
; ATOM-NEXT: paddd %mm0, %mm0 # sched: [1:0.50]
; ATOM-NEXT: movq %mm0, (%rdi) # sched: [1:1.00]
; ATOM-NEXT: nop # sched: [1:0.50]
; ATOM-NEXT: nop # sched: [1:0.50]
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_movq:
; SLM: # %bb.0:
; SLM-NEXT: movq (%rdi), %mm0 # sched: [3:1.00]
; SLM-NEXT: paddd %mm0, %mm0 # sched: [1:0.50]
; SLM-NEXT: movq %mm0, (%rdi) # sched: [1:1.00]
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_movq:
; SANDY: # %bb.0:
; SANDY-NEXT: movq (%rdi), %mm0 # sched: [5:0.50]
; SANDY-NEXT: paddd %mm0, %mm0 # sched: [3:1.00]
; SANDY-NEXT: movq %mm0, (%rdi) # sched: [1:1.00]
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_movq:
; HASWELL: # %bb.0:
; HASWELL-NEXT: movq (%rdi), %mm0 # sched: [5:0.50]
; HASWELL-NEXT: paddd %mm0, %mm0 # sched: [1:0.50]
; HASWELL-NEXT: movq %mm0, (%rdi) # sched: [1:1.00]
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_movq:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: movq (%rdi), %mm0 # sched: [5:0.50]
; BROADWELL-NEXT: paddd %mm0, %mm0 # sched: [1:0.50]
; BROADWELL-NEXT: movq %mm0, (%rdi) # sched: [1:1.00]
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_movq:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: movq (%rdi), %mm0 # sched: [5:0.50]
; SKYLAKE-NEXT: paddd %mm0, %mm0 # sched: [1:0.50]
; SKYLAKE-NEXT: movq %mm0, (%rdi) # sched: [1:1.00]
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_movq:
; SKX: # %bb.0:
; SKX-NEXT: movq (%rdi), %mm0 # sched: [5:0.50]
; SKX-NEXT: paddd %mm0, %mm0 # sched: [1:0.50]
; SKX-NEXT: movq %mm0, (%rdi) # sched: [1:1.00]
; SKX-NEXT: retq # sched: [7:1.00]
;
; BDVER2-LABEL: test_movq:
; BDVER2: # %bb.0:
; BDVER2-NEXT: movq (%rdi), %mm0 # sched: [5:0.50]
; BDVER2-NEXT: paddd %mm0, %mm0 # sched: [2:0.50]
; BDVER2-NEXT: movq %mm0, (%rdi) # sched: [2:1.00]
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_movq:
; BTVER2: # %bb.0:
; BTVER2-NEXT: movq (%rdi), %mm0 # sched: [5:1.00]
; BTVER2-NEXT: paddd %mm0, %mm0 # sched: [1:0.50]
; BTVER2-NEXT: movq %mm0, (%rdi) # sched: [2:1.00]
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_movq:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: movq (%rdi), %mm0 # sched: [8:0.50]
; ZNVER1-NEXT: paddd %mm0, %mm0 # sched: [1:0.25]
; ZNVER1-NEXT: movq %mm0, (%rdi) # sched: [1:0.50]
; ZNVER1-NEXT: retq # sched: [1:0.50]
%1 = load i64, i64* %a0, align 8
%2 = bitcast i64 %1 to x86_mmx
%3 = call x86_mmx @llvm.x86.mmx.padd.d(x86_mmx %2, x86_mmx %2)
%4 = bitcast x86_mmx %3 to i64
store i64 %4, i64* %a0, align 8
ret void
}
define <2 x i64> @test_movq2dq(x86_mmx %a0) optsize {
; GENERIC-LABEL: test_movq2dq:
; GENERIC: # %bb.0:
; GENERIC-NEXT: movq2dq %mm0, %xmm0 # sched: [1:0.33]
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_movq2dq:
; ATOM: # %bb.0:
; ATOM-NEXT: movq2dq %mm0, %xmm0 # sched: [1:0.50]
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_movq2dq:
; SLM: # %bb.0:
; SLM-NEXT: movq2dq %mm0, %xmm0 # sched: [1:0.50]
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_movq2dq:
; SANDY: # %bb.0:
; SANDY-NEXT: movq2dq %mm0, %xmm0 # sched: [1:0.33]
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_movq2dq:
; HASWELL: # %bb.0:
; HASWELL-NEXT: movq2dq %mm0, %xmm0 # sched: [1:1.00]
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_movq2dq:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: movq2dq %mm0, %xmm0 # sched: [1:1.00]
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_movq2dq:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: movq2dq %mm0, %xmm0 # sched: [2:2.00]
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_movq2dq:
; SKX: # %bb.0:
; SKX-NEXT: movq2dq %mm0, %xmm0 # sched: [2:2.00]
; SKX-NEXT: retq # sched: [7:1.00]
;
; BDVER2-LABEL: test_movq2dq:
; BDVER2: # %bb.0:
; BDVER2-NEXT: movq2dq %mm0, %xmm0 # sched: [2:0.50]
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_movq2dq:
; BTVER2: # %bb.0:
; BTVER2-NEXT: movq2dq %mm0, %xmm0 # sched: [1:0.50]
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_movq2dq:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: movq2dq %mm0, %xmm0 # sched: [1:0.25]
; ZNVER1-NEXT: retq # sched: [1:0.50]
%1 = bitcast x86_mmx %a0 to i64
%2 = insertelement <2 x i64> undef, i64 %1, i32 0
ret <2 x i64> %2
}
define i64 @test_pabsb(x86_mmx *%a0) optsize {
; GENERIC-LABEL: test_pabsb:
; GENERIC: # %bb.0:
; GENERIC-NEXT: pabsb (%rdi), %mm0 # sched: [6:0.50]
; GENERIC-NEXT: pabsb %mm0, %mm0 # sched: [1:0.50]
; GENERIC-NEXT: movq %mm0, %rax # sched: [2:1.00]
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_pabsb:
; ATOM: # %bb.0:
; ATOM-NEXT: pabsb (%rdi), %mm0 # sched: [1:1.00]
; ATOM-NEXT: pabsb %mm0, %mm0 # sched: [1:0.50]
; ATOM-NEXT: movq %mm0, %rax # sched: [3:3.00]
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_pabsb:
; SLM: # %bb.0:
; SLM-NEXT: pabsb (%rdi), %mm0 # sched: [4:1.00]
; SLM-NEXT: pabsb %mm0, %mm0 # sched: [1:0.50]
; SLM-NEXT: movq %mm0, %rax # sched: [1:0.50]
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_pabsb:
; SANDY: # %bb.0:
; SANDY-NEXT: pabsb (%rdi), %mm0 # sched: [6:0.50]
; SANDY-NEXT: pabsb %mm0, %mm0 # sched: [1:0.50]
; SANDY-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_pabsb:
; HASWELL: # %bb.0:
; HASWELL-NEXT: pabsb (%rdi), %mm0 # sched: [6:0.50]
; HASWELL-NEXT: pabsb %mm0, %mm0 # sched: [1:0.50]
; HASWELL-NEXT: movq %mm0, %rax # sched: [1:1.00]
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_pabsb:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: pabsb (%rdi), %mm0 # sched: [6:0.50]
; BROADWELL-NEXT: pabsb %mm0, %mm0 # sched: [1:0.50]
; BROADWELL-NEXT: movq %mm0, %rax # sched: [1:1.00]
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_pabsb:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: pabsb (%rdi), %mm0 # sched: [6:0.50]
; SKYLAKE-NEXT: pabsb %mm0, %mm0 # sched: [1:0.50]
; SKYLAKE-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_pabsb:
; SKX: # %bb.0:
; SKX-NEXT: pabsb (%rdi), %mm0 # sched: [6:0.50]
; SKX-NEXT: pabsb %mm0, %mm0 # sched: [1:0.50]
; SKX-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SKX-NEXT: retq # sched: [7:1.00]
;
; BDVER2-LABEL: test_pabsb:
; BDVER2: # %bb.0:
; BDVER2-NEXT: pabsb (%rdi), %mm0 # sched: [7:0.50]
; BDVER2-NEXT: pabsb %mm0, %mm0 # sched: [2:0.50]
; BDVER2-NEXT: movq %mm0, %rax # sched: [10:1.00]
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_pabsb:
; BTVER2: # %bb.0:
; BTVER2-NEXT: pabsb (%rdi), %mm0 # sched: [6:1.00]
; BTVER2-NEXT: pabsb %mm0, %mm0 # sched: [1:0.50]
; BTVER2-NEXT: movq %mm0, %rax # sched: [4:1.00]
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_pabsb:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: pabsb (%rdi), %mm0 # sched: [8:0.50]
; ZNVER1-NEXT: pabsb %mm0, %mm0 # sched: [1:0.25]
; ZNVER1-NEXT: movq %mm0, %rax # sched: [2:1.00]
; ZNVER1-NEXT: retq # sched: [1:0.50]
%1 = load x86_mmx, x86_mmx *%a0, align 8
%2 = call x86_mmx @llvm.x86.ssse3.pabs.b(x86_mmx %1)
%3 = call x86_mmx @llvm.x86.ssse3.pabs.b(x86_mmx %2)
%4 = bitcast x86_mmx %3 to i64
ret i64 %4
}
declare x86_mmx @llvm.x86.ssse3.pabs.b(x86_mmx) nounwind readnone
define i64 @test_pabsd(x86_mmx *%a0) optsize {
; GENERIC-LABEL: test_pabsd:
; GENERIC: # %bb.0:
; GENERIC-NEXT: pabsd (%rdi), %mm0 # sched: [6:0.50]
; GENERIC-NEXT: pabsd %mm0, %mm0 # sched: [1:0.50]
; GENERIC-NEXT: movq %mm0, %rax # sched: [2:1.00]
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_pabsd:
; ATOM: # %bb.0:
; ATOM-NEXT: pabsd (%rdi), %mm0 # sched: [1:1.00]
; ATOM-NEXT: pabsd %mm0, %mm0 # sched: [1:0.50]
; ATOM-NEXT: movq %mm0, %rax # sched: [3:3.00]
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_pabsd:
; SLM: # %bb.0:
; SLM-NEXT: pabsd (%rdi), %mm0 # sched: [4:1.00]
; SLM-NEXT: pabsd %mm0, %mm0 # sched: [1:0.50]
; SLM-NEXT: movq %mm0, %rax # sched: [1:0.50]
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_pabsd:
; SANDY: # %bb.0:
; SANDY-NEXT: pabsd (%rdi), %mm0 # sched: [6:0.50]
; SANDY-NEXT: pabsd %mm0, %mm0 # sched: [1:0.50]
; SANDY-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_pabsd:
; HASWELL: # %bb.0:
; HASWELL-NEXT: pabsd (%rdi), %mm0 # sched: [6:0.50]
; HASWELL-NEXT: pabsd %mm0, %mm0 # sched: [1:0.50]
; HASWELL-NEXT: movq %mm0, %rax # sched: [1:1.00]
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_pabsd:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: pabsd (%rdi), %mm0 # sched: [6:0.50]
; BROADWELL-NEXT: pabsd %mm0, %mm0 # sched: [1:0.50]
; BROADWELL-NEXT: movq %mm0, %rax # sched: [1:1.00]
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_pabsd:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: pabsd (%rdi), %mm0 # sched: [6:0.50]
; SKYLAKE-NEXT: pabsd %mm0, %mm0 # sched: [1:0.50]
; SKYLAKE-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_pabsd:
; SKX: # %bb.0:
; SKX-NEXT: pabsd (%rdi), %mm0 # sched: [6:0.50]
; SKX-NEXT: pabsd %mm0, %mm0 # sched: [1:0.50]
; SKX-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SKX-NEXT: retq # sched: [7:1.00]
;
; BDVER2-LABEL: test_pabsd:
; BDVER2: # %bb.0:
; BDVER2-NEXT: pabsd (%rdi), %mm0 # sched: [7:0.50]
; BDVER2-NEXT: pabsd %mm0, %mm0 # sched: [2:0.50]
; BDVER2-NEXT: movq %mm0, %rax # sched: [10:1.00]
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_pabsd:
; BTVER2: # %bb.0:
; BTVER2-NEXT: pabsd (%rdi), %mm0 # sched: [6:1.00]
; BTVER2-NEXT: pabsd %mm0, %mm0 # sched: [1:0.50]
; BTVER2-NEXT: movq %mm0, %rax # sched: [4:1.00]
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_pabsd:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: pabsd (%rdi), %mm0 # sched: [8:0.50]
; ZNVER1-NEXT: pabsd %mm0, %mm0 # sched: [1:0.25]
; ZNVER1-NEXT: movq %mm0, %rax # sched: [2:1.00]
; ZNVER1-NEXT: retq # sched: [1:0.50]
%1 = load x86_mmx, x86_mmx *%a0, align 8
%2 = call x86_mmx @llvm.x86.ssse3.pabs.d(x86_mmx %1)
%3 = call x86_mmx @llvm.x86.ssse3.pabs.d(x86_mmx %2)
%4 = bitcast x86_mmx %3 to i64
ret i64 %4
}
declare x86_mmx @llvm.x86.ssse3.pabs.d(x86_mmx) nounwind readnone
define i64 @test_pabsw(x86_mmx *%a0) optsize {
; GENERIC-LABEL: test_pabsw:
; GENERIC: # %bb.0:
; GENERIC-NEXT: pabsw (%rdi), %mm0 # sched: [6:0.50]
; GENERIC-NEXT: pabsw %mm0, %mm0 # sched: [1:0.50]
; GENERIC-NEXT: movq %mm0, %rax # sched: [2:1.00]
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_pabsw:
; ATOM: # %bb.0:
; ATOM-NEXT: pabsw (%rdi), %mm0 # sched: [1:1.00]
; ATOM-NEXT: pabsw %mm0, %mm0 # sched: [1:0.50]
; ATOM-NEXT: movq %mm0, %rax # sched: [3:3.00]
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_pabsw:
; SLM: # %bb.0:
; SLM-NEXT: pabsw (%rdi), %mm0 # sched: [4:1.00]
; SLM-NEXT: pabsw %mm0, %mm0 # sched: [1:0.50]
; SLM-NEXT: movq %mm0, %rax # sched: [1:0.50]
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_pabsw:
; SANDY: # %bb.0:
; SANDY-NEXT: pabsw (%rdi), %mm0 # sched: [6:0.50]
; SANDY-NEXT: pabsw %mm0, %mm0 # sched: [1:0.50]
; SANDY-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_pabsw:
; HASWELL: # %bb.0:
; HASWELL-NEXT: pabsw (%rdi), %mm0 # sched: [6:0.50]
; HASWELL-NEXT: pabsw %mm0, %mm0 # sched: [1:0.50]
; HASWELL-NEXT: movq %mm0, %rax # sched: [1:1.00]
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_pabsw:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: pabsw (%rdi), %mm0 # sched: [6:0.50]
; BROADWELL-NEXT: pabsw %mm0, %mm0 # sched: [1:0.50]
; BROADWELL-NEXT: movq %mm0, %rax # sched: [1:1.00]
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_pabsw:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: pabsw (%rdi), %mm0 # sched: [6:0.50]
; SKYLAKE-NEXT: pabsw %mm0, %mm0 # sched: [1:0.50]
; SKYLAKE-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_pabsw:
; SKX: # %bb.0:
; SKX-NEXT: pabsw (%rdi), %mm0 # sched: [6:0.50]
; SKX-NEXT: pabsw %mm0, %mm0 # sched: [1:0.50]
; SKX-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SKX-NEXT: retq # sched: [7:1.00]
;
; BDVER2-LABEL: test_pabsw:
; BDVER2: # %bb.0:
; BDVER2-NEXT: pabsw (%rdi), %mm0 # sched: [7:0.50]
; BDVER2-NEXT: pabsw %mm0, %mm0 # sched: [2:0.50]
; BDVER2-NEXT: movq %mm0, %rax # sched: [10:1.00]
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_pabsw:
; BTVER2: # %bb.0:
; BTVER2-NEXT: pabsw (%rdi), %mm0 # sched: [6:1.00]
; BTVER2-NEXT: pabsw %mm0, %mm0 # sched: [1:0.50]
; BTVER2-NEXT: movq %mm0, %rax # sched: [4:1.00]
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_pabsw:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: pabsw (%rdi), %mm0 # sched: [8:0.50]
; ZNVER1-NEXT: pabsw %mm0, %mm0 # sched: [1:0.25]
; ZNVER1-NEXT: movq %mm0, %rax # sched: [2:1.00]
; ZNVER1-NEXT: retq # sched: [1:0.50]
%1 = load x86_mmx, x86_mmx *%a0, align 8
%2 = call x86_mmx @llvm.x86.ssse3.pabs.w(x86_mmx %1)
%3 = call x86_mmx @llvm.x86.ssse3.pabs.w(x86_mmx %2)
%4 = bitcast x86_mmx %3 to i64
ret i64 %4
}
declare x86_mmx @llvm.x86.ssse3.pabs.w(x86_mmx) nounwind readnone
define i64 @test_packssdw(x86_mmx %a0, x86_mmx %a1, x86_mmx* %a2) optsize {
; GENERIC-LABEL: test_packssdw:
; GENERIC: # %bb.0:
; GENERIC-NEXT: packssdw %mm1, %mm0 # sched: [1:1.00]
; GENERIC-NEXT: packssdw (%rdi), %mm0 # sched: [6:1.00]
; GENERIC-NEXT: movq %mm0, %rax # sched: [2:1.00]
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_packssdw:
; ATOM: # %bb.0:
; ATOM-NEXT: packssdw %mm1, %mm0 # sched: [1:0.50]
; ATOM-NEXT: packssdw (%rdi), %mm0 # sched: [1:1.00]
; ATOM-NEXT: movq %mm0, %rax # sched: [3:3.00]
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_packssdw:
; SLM: # %bb.0:
; SLM-NEXT: packssdw %mm1, %mm0 # sched: [1:1.00]
; SLM-NEXT: packssdw (%rdi), %mm0 # sched: [4:1.00]
; SLM-NEXT: movq %mm0, %rax # sched: [1:0.50]
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_packssdw:
; SANDY: # %bb.0:
; SANDY-NEXT: packssdw %mm1, %mm0 # sched: [1:1.00]
; SANDY-NEXT: packssdw (%rdi), %mm0 # sched: [6:1.00]
; SANDY-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_packssdw:
; HASWELL: # %bb.0:
; HASWELL-NEXT: packssdw %mm1, %mm0 # sched: [3:2.00]
; HASWELL-NEXT: packssdw (%rdi), %mm0 # sched: [7:2.00]
; HASWELL-NEXT: movq %mm0, %rax # sched: [1:1.00]
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_packssdw:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: packssdw %mm1, %mm0 # sched: [3:2.00]
; BROADWELL-NEXT: packssdw (%rdi), %mm0 # sched: [7:2.00]
; BROADWELL-NEXT: movq %mm0, %rax # sched: [1:1.00]
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_packssdw:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: packssdw %mm1, %mm0 # sched: [3:2.00]
; SKYLAKE-NEXT: packssdw (%rdi), %mm0 # sched: [7:2.00]
; SKYLAKE-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_packssdw:
; SKX: # %bb.0:
; SKX-NEXT: packssdw %mm1, %mm0 # sched: [3:2.00]
; SKX-NEXT: packssdw (%rdi), %mm0 # sched: [7:2.00]
; SKX-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SKX-NEXT: retq # sched: [7:1.00]
;
; BDVER2-LABEL: test_packssdw:
; BDVER2: # %bb.0:
; BDVER2-NEXT: packssdw %mm1, %mm0 # sched: [2:0.50]
; BDVER2-NEXT: packssdw (%rdi), %mm0 # sched: [7:0.50]
; BDVER2-NEXT: movq %mm0, %rax # sched: [10:1.00]
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_packssdw:
; BTVER2: # %bb.0:
; BTVER2-NEXT: packssdw %mm1, %mm0 # sched: [1:0.50]
; BTVER2-NEXT: packssdw (%rdi), %mm0 # sched: [6:1.00]
; BTVER2-NEXT: movq %mm0, %rax # sched: [4:1.00]
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_packssdw:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: packssdw %mm1, %mm0 # sched: [1:0.50]
; ZNVER1-NEXT: packssdw (%rdi), %mm0 # sched: [1:0.50]
; ZNVER1-NEXT: movq %mm0, %rax # sched: [2:1.00]
; ZNVER1-NEXT: retq # sched: [1:0.50]
%1 = call x86_mmx @llvm.x86.mmx.packssdw(x86_mmx %a0, x86_mmx %a1)
%2 = load x86_mmx, x86_mmx *%a2, align 8
%3 = call x86_mmx @llvm.x86.mmx.packssdw(x86_mmx %1, x86_mmx %2)
%4 = bitcast x86_mmx %3 to i64
ret i64 %4
}
declare x86_mmx @llvm.x86.mmx.packssdw(x86_mmx, x86_mmx) nounwind readnone
define i64 @test_packsswb(x86_mmx %a0, x86_mmx %a1, x86_mmx* %a2) optsize {
; GENERIC-LABEL: test_packsswb:
; GENERIC: # %bb.0:
; GENERIC-NEXT: packsswb %mm1, %mm0 # sched: [1:1.00]
; GENERIC-NEXT: packsswb (%rdi), %mm0 # sched: [6:1.00]
; GENERIC-NEXT: movq %mm0, %rax # sched: [2:1.00]
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_packsswb:
; ATOM: # %bb.0:
; ATOM-NEXT: packsswb %mm1, %mm0 # sched: [1:0.50]
; ATOM-NEXT: packsswb (%rdi), %mm0 # sched: [1:1.00]
; ATOM-NEXT: movq %mm0, %rax # sched: [3:3.00]
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_packsswb:
; SLM: # %bb.0:
; SLM-NEXT: packsswb %mm1, %mm0 # sched: [1:1.00]
; SLM-NEXT: packsswb (%rdi), %mm0 # sched: [4:1.00]
; SLM-NEXT: movq %mm0, %rax # sched: [1:0.50]
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_packsswb:
; SANDY: # %bb.0:
; SANDY-NEXT: packsswb %mm1, %mm0 # sched: [1:1.00]
; SANDY-NEXT: packsswb (%rdi), %mm0 # sched: [6:1.00]
; SANDY-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_packsswb:
; HASWELL: # %bb.0:
; HASWELL-NEXT: packsswb %mm1, %mm0 # sched: [3:2.00]
; HASWELL-NEXT: packsswb (%rdi), %mm0 # sched: [7:2.00]
; HASWELL-NEXT: movq %mm0, %rax # sched: [1:1.00]
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_packsswb:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: packsswb %mm1, %mm0 # sched: [3:2.00]
; BROADWELL-NEXT: packsswb (%rdi), %mm0 # sched: [7:2.00]
; BROADWELL-NEXT: movq %mm0, %rax # sched: [1:1.00]
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_packsswb:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: packsswb %mm1, %mm0 # sched: [3:2.00]
; SKYLAKE-NEXT: packsswb (%rdi), %mm0 # sched: [7:2.00]
; SKYLAKE-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_packsswb:
; SKX: # %bb.0:
; SKX-NEXT: packsswb %mm1, %mm0 # sched: [3:2.00]
; SKX-NEXT: packsswb (%rdi), %mm0 # sched: [7:2.00]
; SKX-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SKX-NEXT: retq # sched: [7:1.00]
;
; BDVER2-LABEL: test_packsswb:
; BDVER2: # %bb.0:
; BDVER2-NEXT: packsswb %mm1, %mm0 # sched: [2:0.50]
; BDVER2-NEXT: packsswb (%rdi), %mm0 # sched: [7:0.50]
; BDVER2-NEXT: movq %mm0, %rax # sched: [10:1.00]
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_packsswb:
; BTVER2: # %bb.0:
; BTVER2-NEXT: packsswb %mm1, %mm0 # sched: [1:0.50]
; BTVER2-NEXT: packsswb (%rdi), %mm0 # sched: [6:1.00]
; BTVER2-NEXT: movq %mm0, %rax # sched: [4:1.00]
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_packsswb:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: packsswb %mm1, %mm0 # sched: [1:0.50]
; ZNVER1-NEXT: packsswb (%rdi), %mm0 # sched: [1:0.50]
; ZNVER1-NEXT: movq %mm0, %rax # sched: [2:1.00]
; ZNVER1-NEXT: retq # sched: [1:0.50]
%1 = call x86_mmx @llvm.x86.mmx.packsswb(x86_mmx %a0, x86_mmx %a1)
%2 = load x86_mmx, x86_mmx *%a2, align 8
%3 = call x86_mmx @llvm.x86.mmx.packsswb(x86_mmx %1, x86_mmx %2)
%4 = bitcast x86_mmx %3 to i64
ret i64 %4
}
declare x86_mmx @llvm.x86.mmx.packsswb(x86_mmx, x86_mmx) nounwind readnone
define i64 @test_packuswb(x86_mmx %a0, x86_mmx %a1, x86_mmx* %a2) optsize {
; GENERIC-LABEL: test_packuswb:
; GENERIC: # %bb.0:
; GENERIC-NEXT: packuswb %mm1, %mm0 # sched: [1:1.00]
; GENERIC-NEXT: packuswb (%rdi), %mm0 # sched: [6:1.00]
; GENERIC-NEXT: movq %mm0, %rax # sched: [2:1.00]
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_packuswb:
; ATOM: # %bb.0:
; ATOM-NEXT: packuswb %mm1, %mm0 # sched: [1:0.50]
; ATOM-NEXT: packuswb (%rdi), %mm0 # sched: [1:1.00]
; ATOM-NEXT: movq %mm0, %rax # sched: [3:3.00]
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_packuswb:
; SLM: # %bb.0:
; SLM-NEXT: packuswb %mm1, %mm0 # sched: [1:1.00]
; SLM-NEXT: packuswb (%rdi), %mm0 # sched: [4:1.00]
; SLM-NEXT: movq %mm0, %rax # sched: [1:0.50]
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_packuswb:
; SANDY: # %bb.0:
; SANDY-NEXT: packuswb %mm1, %mm0 # sched: [1:1.00]
; SANDY-NEXT: packuswb (%rdi), %mm0 # sched: [6:1.00]
; SANDY-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_packuswb:
; HASWELL: # %bb.0:
; HASWELL-NEXT: packuswb %mm1, %mm0 # sched: [3:2.00]
; HASWELL-NEXT: packuswb (%rdi), %mm0 # sched: [7:2.00]
; HASWELL-NEXT: movq %mm0, %rax # sched: [1:1.00]
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_packuswb:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: packuswb %mm1, %mm0 # sched: [3:2.00]
; BROADWELL-NEXT: packuswb (%rdi), %mm0 # sched: [7:2.00]
; BROADWELL-NEXT: movq %mm0, %rax # sched: [1:1.00]
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_packuswb:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: packuswb %mm1, %mm0 # sched: [3:2.00]
; SKYLAKE-NEXT: packuswb (%rdi), %mm0 # sched: [7:2.00]
; SKYLAKE-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_packuswb:
; SKX: # %bb.0:
; SKX-NEXT: packuswb %mm1, %mm0 # sched: [3:2.00]
; SKX-NEXT: packuswb (%rdi), %mm0 # sched: [7:2.00]
; SKX-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SKX-NEXT: retq # sched: [7:1.00]
;
; BDVER2-LABEL: test_packuswb:
; BDVER2: # %bb.0:
; BDVER2-NEXT: packuswb %mm1, %mm0 # sched: [2:0.50]
; BDVER2-NEXT: packuswb (%rdi), %mm0 # sched: [7:0.50]
; BDVER2-NEXT: movq %mm0, %rax # sched: [10:1.00]
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_packuswb:
; BTVER2: # %bb.0:
; BTVER2-NEXT: packuswb %mm1, %mm0 # sched: [1:0.50]
; BTVER2-NEXT: packuswb (%rdi), %mm0 # sched: [6:1.00]
; BTVER2-NEXT: movq %mm0, %rax # sched: [4:1.00]
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_packuswb:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: packuswb %mm1, %mm0 # sched: [1:0.50]
; ZNVER1-NEXT: packuswb (%rdi), %mm0 # sched: [1:0.50]
; ZNVER1-NEXT: movq %mm0, %rax # sched: [2:1.00]
; ZNVER1-NEXT: retq # sched: [1:0.50]
%1 = call x86_mmx @llvm.x86.mmx.packuswb(x86_mmx %a0, x86_mmx %a1)
%2 = load x86_mmx, x86_mmx *%a2, align 8
%3 = call x86_mmx @llvm.x86.mmx.packuswb(x86_mmx %1, x86_mmx %2)
%4 = bitcast x86_mmx %3 to i64
ret i64 %4
}
declare x86_mmx @llvm.x86.mmx.packuswb(x86_mmx, x86_mmx) nounwind readnone
define i64 @test_paddb(x86_mmx %a0, x86_mmx %a1, x86_mmx* %a2) optsize {
; GENERIC-LABEL: test_paddb:
; GENERIC: # %bb.0:
; GENERIC-NEXT: paddb %mm1, %mm0 # sched: [3:1.00]
; GENERIC-NEXT: paddb (%rdi), %mm0 # sched: [8:1.00]
; GENERIC-NEXT: movq %mm0, %rax # sched: [2:1.00]
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_paddb:
; ATOM: # %bb.0:
; ATOM-NEXT: paddb %mm1, %mm0 # sched: [1:0.50]
; ATOM-NEXT: paddb (%rdi), %mm0 # sched: [1:1.00]
; ATOM-NEXT: movq %mm0, %rax # sched: [3:3.00]
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_paddb:
; SLM: # %bb.0:
; SLM-NEXT: paddb %mm1, %mm0 # sched: [1:0.50]
; SLM-NEXT: paddb (%rdi), %mm0 # sched: [4:1.00]
; SLM-NEXT: movq %mm0, %rax # sched: [1:0.50]
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_paddb:
; SANDY: # %bb.0:
; SANDY-NEXT: paddb %mm1, %mm0 # sched: [3:1.00]
; SANDY-NEXT: paddb (%rdi), %mm0 # sched: [8:1.00]
; SANDY-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_paddb:
; HASWELL: # %bb.0:
; HASWELL-NEXT: paddb %mm1, %mm0 # sched: [1:0.50]
; HASWELL-NEXT: paddb (%rdi), %mm0 # sched: [6:0.50]
; HASWELL-NEXT: movq %mm0, %rax # sched: [1:1.00]
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_paddb:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: paddb %mm1, %mm0 # sched: [1:0.50]
; BROADWELL-NEXT: paddb (%rdi), %mm0 # sched: [6:0.50]
; BROADWELL-NEXT: movq %mm0, %rax # sched: [1:1.00]
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_paddb:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: paddb %mm1, %mm0 # sched: [1:0.50]
; SKYLAKE-NEXT: paddb (%rdi), %mm0 # sched: [6:0.50]
; SKYLAKE-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_paddb:
; SKX: # %bb.0:
; SKX-NEXT: paddb %mm1, %mm0 # sched: [1:0.50]
; SKX-NEXT: paddb (%rdi), %mm0 # sched: [6:0.50]
; SKX-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SKX-NEXT: retq # sched: [7:1.00]
;
; BDVER2-LABEL: test_paddb:
; BDVER2: # %bb.0:
; BDVER2-NEXT: paddb %mm1, %mm0 # sched: [2:0.50]
; BDVER2-NEXT: paddb (%rdi), %mm0 # sched: [7:0.50]
; BDVER2-NEXT: movq %mm0, %rax # sched: [10:1.00]
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_paddb:
; BTVER2: # %bb.0:
; BTVER2-NEXT: paddb %mm1, %mm0 # sched: [1:0.50]
; BTVER2-NEXT: paddb (%rdi), %mm0 # sched: [6:1.00]
; BTVER2-NEXT: movq %mm0, %rax # sched: [4:1.00]
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_paddb:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: paddb %mm1, %mm0 # sched: [1:0.25]
; ZNVER1-NEXT: paddb (%rdi), %mm0 # sched: [8:0.50]
; ZNVER1-NEXT: movq %mm0, %rax # sched: [2:1.00]
; ZNVER1-NEXT: retq # sched: [1:0.50]
%1 = call x86_mmx @llvm.x86.mmx.padd.b(x86_mmx %a0, x86_mmx %a1)
%2 = load x86_mmx, x86_mmx *%a2, align 8
%3 = call x86_mmx @llvm.x86.mmx.padd.b(x86_mmx %1, x86_mmx %2)
%4 = bitcast x86_mmx %3 to i64
ret i64 %4
}
declare x86_mmx @llvm.x86.mmx.padd.b(x86_mmx, x86_mmx) nounwind readnone
define i64 @test_paddd(x86_mmx %a0, x86_mmx %a1, x86_mmx* %a2) optsize {
; GENERIC-LABEL: test_paddd:
; GENERIC: # %bb.0:
; GENERIC-NEXT: paddd %mm1, %mm0 # sched: [3:1.00]
; GENERIC-NEXT: paddd (%rdi), %mm0 # sched: [8:1.00]
; GENERIC-NEXT: movq %mm0, %rax # sched: [2:1.00]
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_paddd:
; ATOM: # %bb.0:
; ATOM-NEXT: paddd %mm1, %mm0 # sched: [1:0.50]
; ATOM-NEXT: paddd (%rdi), %mm0 # sched: [1:1.00]
; ATOM-NEXT: movq %mm0, %rax # sched: [3:3.00]
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_paddd:
; SLM: # %bb.0:
; SLM-NEXT: paddd %mm1, %mm0 # sched: [1:0.50]
; SLM-NEXT: paddd (%rdi), %mm0 # sched: [4:1.00]
; SLM-NEXT: movq %mm0, %rax # sched: [1:0.50]
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_paddd:
; SANDY: # %bb.0:
; SANDY-NEXT: paddd %mm1, %mm0 # sched: [3:1.00]
; SANDY-NEXT: paddd (%rdi), %mm0 # sched: [8:1.00]
; SANDY-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_paddd:
; HASWELL: # %bb.0:
; HASWELL-NEXT: paddd %mm1, %mm0 # sched: [1:0.50]
; HASWELL-NEXT: paddd (%rdi), %mm0 # sched: [6:0.50]
; HASWELL-NEXT: movq %mm0, %rax # sched: [1:1.00]
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_paddd:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: paddd %mm1, %mm0 # sched: [1:0.50]
; BROADWELL-NEXT: paddd (%rdi), %mm0 # sched: [6:0.50]
; BROADWELL-NEXT: movq %mm0, %rax # sched: [1:1.00]
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_paddd:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: paddd %mm1, %mm0 # sched: [1:0.50]
; SKYLAKE-NEXT: paddd (%rdi), %mm0 # sched: [6:0.50]
; SKYLAKE-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_paddd:
; SKX: # %bb.0:
; SKX-NEXT: paddd %mm1, %mm0 # sched: [1:0.50]
; SKX-NEXT: paddd (%rdi), %mm0 # sched: [6:0.50]
; SKX-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SKX-NEXT: retq # sched: [7:1.00]
;
; BDVER2-LABEL: test_paddd:
; BDVER2: # %bb.0:
; BDVER2-NEXT: paddd %mm1, %mm0 # sched: [2:0.50]
; BDVER2-NEXT: paddd (%rdi), %mm0 # sched: [7:0.50]
; BDVER2-NEXT: movq %mm0, %rax # sched: [10:1.00]
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_paddd:
; BTVER2: # %bb.0:
; BTVER2-NEXT: paddd %mm1, %mm0 # sched: [1:0.50]
; BTVER2-NEXT: paddd (%rdi), %mm0 # sched: [6:1.00]
; BTVER2-NEXT: movq %mm0, %rax # sched: [4:1.00]
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_paddd:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: paddd %mm1, %mm0 # sched: [1:0.25]
; ZNVER1-NEXT: paddd (%rdi), %mm0 # sched: [8:0.50]
; ZNVER1-NEXT: movq %mm0, %rax # sched: [2:1.00]
; ZNVER1-NEXT: retq # sched: [1:0.50]
%1 = call x86_mmx @llvm.x86.mmx.padd.d(x86_mmx %a0, x86_mmx %a1)
%2 = load x86_mmx, x86_mmx *%a2, align 8
%3 = call x86_mmx @llvm.x86.mmx.padd.d(x86_mmx %1, x86_mmx %2)
%4 = bitcast x86_mmx %3 to i64
ret i64 %4
}
declare x86_mmx @llvm.x86.mmx.padd.d(x86_mmx, x86_mmx) nounwind readnone
define i64 @test_paddq(x86_mmx %a0, x86_mmx %a1, x86_mmx* %a2) optsize {
; GENERIC-LABEL: test_paddq:
; GENERIC: # %bb.0:
; GENERIC-NEXT: paddq %mm1, %mm0 # sched: [1:0.50]
; GENERIC-NEXT: paddq (%rdi), %mm0 # sched: [7:0.50]
; GENERIC-NEXT: movq %mm0, %rax # sched: [2:1.00]
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_paddq:
; ATOM: # %bb.0:
; ATOM-NEXT: paddq %mm1, %mm0 # sched: [2:1.00]
; ATOM-NEXT: paddq (%rdi), %mm0 # sched: [3:1.50]
; ATOM-NEXT: movq %mm0, %rax # sched: [3:3.00]
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_paddq:
; SLM: # %bb.0:
; SLM-NEXT: paddq %mm1, %mm0 # sched: [1:0.50]
; SLM-NEXT: paddq (%rdi), %mm0 # sched: [4:1.00]
; SLM-NEXT: movq %mm0, %rax # sched: [1:0.50]
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_paddq:
; SANDY: # %bb.0:
; SANDY-NEXT: paddq %mm1, %mm0 # sched: [1:0.50]
; SANDY-NEXT: paddq (%rdi), %mm0 # sched: [7:0.50]
; SANDY-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_paddq:
; HASWELL: # %bb.0:
; HASWELL-NEXT: paddq %mm1, %mm0 # sched: [1:0.50]
; HASWELL-NEXT: paddq (%rdi), %mm0 # sched: [6:0.50]
; HASWELL-NEXT: movq %mm0, %rax # sched: [1:1.00]
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_paddq:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: paddq %mm1, %mm0 # sched: [1:0.50]
; BROADWELL-NEXT: paddq (%rdi), %mm0 # sched: [6:0.50]
; BROADWELL-NEXT: movq %mm0, %rax # sched: [1:1.00]
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_paddq:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: paddq %mm1, %mm0 # sched: [1:0.50]
; SKYLAKE-NEXT: paddq (%rdi), %mm0 # sched: [6:0.50]
; SKYLAKE-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_paddq:
; SKX: # %bb.0:
; SKX-NEXT: paddq %mm1, %mm0 # sched: [1:0.50]
; SKX-NEXT: paddq (%rdi), %mm0 # sched: [6:0.50]
; SKX-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SKX-NEXT: retq # sched: [7:1.00]
;
; BDVER2-LABEL: test_paddq:
; BDVER2: # %bb.0:
; BDVER2-NEXT: paddq %mm1, %mm0 # sched: [2:0.50]
; BDVER2-NEXT: paddq (%rdi), %mm0 # sched: [7:0.50]
; BDVER2-NEXT: movq %mm0, %rax # sched: [10:1.00]
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_paddq:
; BTVER2: # %bb.0:
; BTVER2-NEXT: paddq %mm1, %mm0 # sched: [1:0.50]
; BTVER2-NEXT: paddq (%rdi), %mm0 # sched: [6:1.00]
; BTVER2-NEXT: movq %mm0, %rax # sched: [4:1.00]
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_paddq:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: paddq %mm1, %mm0 # sched: [1:0.25]
; ZNVER1-NEXT: paddq (%rdi), %mm0 # sched: [8:0.50]
; ZNVER1-NEXT: movq %mm0, %rax # sched: [2:1.00]
; ZNVER1-NEXT: retq # sched: [1:0.50]
%1 = call x86_mmx @llvm.x86.mmx.padd.q(x86_mmx %a0, x86_mmx %a1)
%2 = load x86_mmx, x86_mmx *%a2, align 8
%3 = call x86_mmx @llvm.x86.mmx.padd.q(x86_mmx %1, x86_mmx %2)
%4 = bitcast x86_mmx %3 to i64
ret i64 %4
}
declare x86_mmx @llvm.x86.mmx.padd.q(x86_mmx, x86_mmx) nounwind readnone
define i64 @test_paddsb(x86_mmx %a0, x86_mmx %a1, x86_mmx* %a2) optsize {
; GENERIC-LABEL: test_paddsb:
; GENERIC: # %bb.0:
; GENERIC-NEXT: paddsb %mm1, %mm0 # sched: [3:1.00]
; GENERIC-NEXT: paddsb (%rdi), %mm0 # sched: [8:1.00]
; GENERIC-NEXT: movq %mm0, %rax # sched: [2:1.00]
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_paddsb:
; ATOM: # %bb.0:
; ATOM-NEXT: paddsb %mm1, %mm0 # sched: [1:0.50]
; ATOM-NEXT: paddsb (%rdi), %mm0 # sched: [1:1.00]
; ATOM-NEXT: movq %mm0, %rax # sched: [3:3.00]
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_paddsb:
; SLM: # %bb.0:
; SLM-NEXT: paddsb %mm1, %mm0 # sched: [1:0.50]
; SLM-NEXT: paddsb (%rdi), %mm0 # sched: [4:1.00]
; SLM-NEXT: movq %mm0, %rax # sched: [1:0.50]
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_paddsb:
; SANDY: # %bb.0:
; SANDY-NEXT: paddsb %mm1, %mm0 # sched: [3:1.00]
; SANDY-NEXT: paddsb (%rdi), %mm0 # sched: [8:1.00]
; SANDY-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_paddsb:
; HASWELL: # %bb.0:
; HASWELL-NEXT: paddsb %mm1, %mm0 # sched: [1:0.50]
; HASWELL-NEXT: paddsb (%rdi), %mm0 # sched: [6:0.50]
; HASWELL-NEXT: movq %mm0, %rax # sched: [1:1.00]
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_paddsb:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: paddsb %mm1, %mm0 # sched: [1:0.50]
; BROADWELL-NEXT: paddsb (%rdi), %mm0 # sched: [6:0.50]
; BROADWELL-NEXT: movq %mm0, %rax # sched: [1:1.00]
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_paddsb:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: paddsb %mm1, %mm0 # sched: [1:1.00]
; SKYLAKE-NEXT: paddsb (%rdi), %mm0 # sched: [6:1.00]
; SKYLAKE-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_paddsb:
; SKX: # %bb.0:
; SKX-NEXT: paddsb %mm1, %mm0 # sched: [1:1.00]
; SKX-NEXT: paddsb (%rdi), %mm0 # sched: [6:1.00]
; SKX-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SKX-NEXT: retq # sched: [7:1.00]
;
; BDVER2-LABEL: test_paddsb:
; BDVER2: # %bb.0:
; BDVER2-NEXT: paddsb %mm1, %mm0 # sched: [2:0.50]
; BDVER2-NEXT: paddsb (%rdi), %mm0 # sched: [7:0.50]
; BDVER2-NEXT: movq %mm0, %rax # sched: [10:1.00]
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_paddsb:
; BTVER2: # %bb.0:
; BTVER2-NEXT: paddsb %mm1, %mm0 # sched: [1:0.50]
; BTVER2-NEXT: paddsb (%rdi), %mm0 # sched: [6:1.00]
; BTVER2-NEXT: movq %mm0, %rax # sched: [4:1.00]
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_paddsb:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: paddsb %mm1, %mm0 # sched: [1:0.25]
; ZNVER1-NEXT: paddsb (%rdi), %mm0 # sched: [8:0.50]
; ZNVER1-NEXT: movq %mm0, %rax # sched: [2:1.00]
; ZNVER1-NEXT: retq # sched: [1:0.50]
%1 = call x86_mmx @llvm.x86.mmx.padds.b(x86_mmx %a0, x86_mmx %a1)
%2 = load x86_mmx, x86_mmx *%a2, align 8
%3 = call x86_mmx @llvm.x86.mmx.padds.b(x86_mmx %1, x86_mmx %2)
%4 = bitcast x86_mmx %3 to i64
ret i64 %4
}
declare x86_mmx @llvm.x86.mmx.padds.b(x86_mmx, x86_mmx) nounwind readnone
define i64 @test_paddsw(x86_mmx %a0, x86_mmx %a1, x86_mmx* %a2) optsize {
; GENERIC-LABEL: test_paddsw:
; GENERIC: # %bb.0:
; GENERIC-NEXT: paddsw %mm1, %mm0 # sched: [3:1.00]
; GENERIC-NEXT: paddsw (%rdi), %mm0 # sched: [8:1.00]
; GENERIC-NEXT: movq %mm0, %rax # sched: [2:1.00]
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_paddsw:
; ATOM: # %bb.0:
; ATOM-NEXT: paddsw %mm1, %mm0 # sched: [1:0.50]
; ATOM-NEXT: paddsw (%rdi), %mm0 # sched: [1:1.00]
; ATOM-NEXT: movq %mm0, %rax # sched: [3:3.00]
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_paddsw:
; SLM: # %bb.0:
; SLM-NEXT: paddsw %mm1, %mm0 # sched: [1:0.50]
; SLM-NEXT: paddsw (%rdi), %mm0 # sched: [4:1.00]
; SLM-NEXT: movq %mm0, %rax # sched: [1:0.50]
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_paddsw:
; SANDY: # %bb.0:
; SANDY-NEXT: paddsw %mm1, %mm0 # sched: [3:1.00]
; SANDY-NEXT: paddsw (%rdi), %mm0 # sched: [8:1.00]
; SANDY-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_paddsw:
; HASWELL: # %bb.0:
; HASWELL-NEXT: paddsw %mm1, %mm0 # sched: [1:0.50]
; HASWELL-NEXT: paddsw (%rdi), %mm0 # sched: [6:0.50]
; HASWELL-NEXT: movq %mm0, %rax # sched: [1:1.00]
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_paddsw:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: paddsw %mm1, %mm0 # sched: [1:0.50]
; BROADWELL-NEXT: paddsw (%rdi), %mm0 # sched: [6:0.50]
; BROADWELL-NEXT: movq %mm0, %rax # sched: [1:1.00]
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_paddsw:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: paddsw %mm1, %mm0 # sched: [1:1.00]
; SKYLAKE-NEXT: paddsw (%rdi), %mm0 # sched: [6:1.00]
; SKYLAKE-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_paddsw:
; SKX: # %bb.0:
; SKX-NEXT: paddsw %mm1, %mm0 # sched: [1:1.00]
; SKX-NEXT: paddsw (%rdi), %mm0 # sched: [6:1.00]
; SKX-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SKX-NEXT: retq # sched: [7:1.00]
;
; BDVER2-LABEL: test_paddsw:
; BDVER2: # %bb.0:
; BDVER2-NEXT: paddsw %mm1, %mm0 # sched: [2:0.50]
; BDVER2-NEXT: paddsw (%rdi), %mm0 # sched: [7:0.50]
; BDVER2-NEXT: movq %mm0, %rax # sched: [10:1.00]
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_paddsw:
; BTVER2: # %bb.0:
; BTVER2-NEXT: paddsw %mm1, %mm0 # sched: [1:0.50]
; BTVER2-NEXT: paddsw (%rdi), %mm0 # sched: [6:1.00]
; BTVER2-NEXT: movq %mm0, %rax # sched: [4:1.00]
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_paddsw:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: paddsw %mm1, %mm0 # sched: [1:0.25]
; ZNVER1-NEXT: paddsw (%rdi), %mm0 # sched: [8:0.50]
; ZNVER1-NEXT: movq %mm0, %rax # sched: [2:1.00]
; ZNVER1-NEXT: retq # sched: [1:0.50]
%1 = call x86_mmx @llvm.x86.mmx.padds.w(x86_mmx %a0, x86_mmx %a1)
%2 = load x86_mmx, x86_mmx *%a2, align 8
%3 = call x86_mmx @llvm.x86.mmx.padds.w(x86_mmx %1, x86_mmx %2)
%4 = bitcast x86_mmx %3 to i64
ret i64 %4
}
declare x86_mmx @llvm.x86.mmx.padds.w(x86_mmx, x86_mmx) nounwind readnone
define i64 @test_paddusb(x86_mmx %a0, x86_mmx %a1, x86_mmx* %a2) optsize {
; GENERIC-LABEL: test_paddusb:
; GENERIC: # %bb.0:
; GENERIC-NEXT: paddusb %mm1, %mm0 # sched: [3:1.00]
; GENERIC-NEXT: paddusb (%rdi), %mm0 # sched: [8:1.00]
; GENERIC-NEXT: movq %mm0, %rax # sched: [2:1.00]
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_paddusb:
; ATOM: # %bb.0:
; ATOM-NEXT: paddusb %mm1, %mm0 # sched: [1:0.50]
; ATOM-NEXT: paddusb (%rdi), %mm0 # sched: [1:1.00]
; ATOM-NEXT: movq %mm0, %rax # sched: [3:3.00]
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_paddusb:
; SLM: # %bb.0:
; SLM-NEXT: paddusb %mm1, %mm0 # sched: [1:0.50]
; SLM-NEXT: paddusb (%rdi), %mm0 # sched: [4:1.00]
; SLM-NEXT: movq %mm0, %rax # sched: [1:0.50]
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_paddusb:
; SANDY: # %bb.0:
; SANDY-NEXT: paddusb %mm1, %mm0 # sched: [3:1.00]
; SANDY-NEXT: paddusb (%rdi), %mm0 # sched: [8:1.00]
; SANDY-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_paddusb:
; HASWELL: # %bb.0:
; HASWELL-NEXT: paddusb %mm1, %mm0 # sched: [1:0.50]
; HASWELL-NEXT: paddusb (%rdi), %mm0 # sched: [6:0.50]
; HASWELL-NEXT: movq %mm0, %rax # sched: [1:1.00]
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_paddusb:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: paddusb %mm1, %mm0 # sched: [1:0.50]
; BROADWELL-NEXT: paddusb (%rdi), %mm0 # sched: [6:0.50]
; BROADWELL-NEXT: movq %mm0, %rax # sched: [1:1.00]
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_paddusb:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: paddusb %mm1, %mm0 # sched: [1:1.00]
; SKYLAKE-NEXT: paddusb (%rdi), %mm0 # sched: [6:1.00]
; SKYLAKE-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_paddusb:
; SKX: # %bb.0:
; SKX-NEXT: paddusb %mm1, %mm0 # sched: [1:1.00]
; SKX-NEXT: paddusb (%rdi), %mm0 # sched: [6:1.00]
; SKX-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SKX-NEXT: retq # sched: [7:1.00]
;
; BDVER2-LABEL: test_paddusb:
; BDVER2: # %bb.0:
; BDVER2-NEXT: paddusb %mm1, %mm0 # sched: [2:0.50]
; BDVER2-NEXT: paddusb (%rdi), %mm0 # sched: [7:0.50]
; BDVER2-NEXT: movq %mm0, %rax # sched: [10:1.00]
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_paddusb:
; BTVER2: # %bb.0:
; BTVER2-NEXT: paddusb %mm1, %mm0 # sched: [1:0.50]
; BTVER2-NEXT: paddusb (%rdi), %mm0 # sched: [6:1.00]
; BTVER2-NEXT: movq %mm0, %rax # sched: [4:1.00]
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_paddusb:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: paddusb %mm1, %mm0 # sched: [1:0.25]
; ZNVER1-NEXT: paddusb (%rdi), %mm0 # sched: [8:0.50]
; ZNVER1-NEXT: movq %mm0, %rax # sched: [2:1.00]
; ZNVER1-NEXT: retq # sched: [1:0.50]
%1 = call x86_mmx @llvm.x86.mmx.paddus.b(x86_mmx %a0, x86_mmx %a1)
%2 = load x86_mmx, x86_mmx *%a2, align 8
%3 = call x86_mmx @llvm.x86.mmx.paddus.b(x86_mmx %1, x86_mmx %2)
%4 = bitcast x86_mmx %3 to i64
ret i64 %4
}
declare x86_mmx @llvm.x86.mmx.paddus.b(x86_mmx, x86_mmx) nounwind readnone
define i64 @test_paddusw(x86_mmx %a0, x86_mmx %a1, x86_mmx* %a2) optsize {
; GENERIC-LABEL: test_paddusw:
; GENERIC: # %bb.0:
; GENERIC-NEXT: paddusw %mm1, %mm0 # sched: [3:1.00]
; GENERIC-NEXT: paddusw (%rdi), %mm0 # sched: [8:1.00]
; GENERIC-NEXT: movq %mm0, %rax # sched: [2:1.00]
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_paddusw:
; ATOM: # %bb.0:
; ATOM-NEXT: paddusw %mm1, %mm0 # sched: [1:0.50]
; ATOM-NEXT: paddusw (%rdi), %mm0 # sched: [1:1.00]
; ATOM-NEXT: movq %mm0, %rax # sched: [3:3.00]
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_paddusw:
; SLM: # %bb.0:
; SLM-NEXT: paddusw %mm1, %mm0 # sched: [1:0.50]
; SLM-NEXT: paddusw (%rdi), %mm0 # sched: [4:1.00]
; SLM-NEXT: movq %mm0, %rax # sched: [1:0.50]
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_paddusw:
; SANDY: # %bb.0:
; SANDY-NEXT: paddusw %mm1, %mm0 # sched: [3:1.00]
; SANDY-NEXT: paddusw (%rdi), %mm0 # sched: [8:1.00]
; SANDY-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_paddusw:
; HASWELL: # %bb.0:
; HASWELL-NEXT: paddusw %mm1, %mm0 # sched: [1:0.50]
; HASWELL-NEXT: paddusw (%rdi), %mm0 # sched: [6:0.50]
; HASWELL-NEXT: movq %mm0, %rax # sched: [1:1.00]
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_paddusw:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: paddusw %mm1, %mm0 # sched: [1:0.50]
; BROADWELL-NEXT: paddusw (%rdi), %mm0 # sched: [6:0.50]
; BROADWELL-NEXT: movq %mm0, %rax # sched: [1:1.00]
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_paddusw:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: paddusw %mm1, %mm0 # sched: [1:1.00]
; SKYLAKE-NEXT: paddusw (%rdi), %mm0 # sched: [6:1.00]
; SKYLAKE-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_paddusw:
; SKX: # %bb.0:
; SKX-NEXT: paddusw %mm1, %mm0 # sched: [1:1.00]
; SKX-NEXT: paddusw (%rdi), %mm0 # sched: [6:1.00]
; SKX-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SKX-NEXT: retq # sched: [7:1.00]
;
; BDVER2-LABEL: test_paddusw:
; BDVER2: # %bb.0:
; BDVER2-NEXT: paddusw %mm1, %mm0 # sched: [2:0.50]
; BDVER2-NEXT: paddusw (%rdi), %mm0 # sched: [7:0.50]
; BDVER2-NEXT: movq %mm0, %rax # sched: [10:1.00]
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_paddusw:
; BTVER2: # %bb.0:
; BTVER2-NEXT: paddusw %mm1, %mm0 # sched: [1:0.50]
; BTVER2-NEXT: paddusw (%rdi), %mm0 # sched: [6:1.00]
; BTVER2-NEXT: movq %mm0, %rax # sched: [4:1.00]
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_paddusw:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: paddusw %mm1, %mm0 # sched: [1:0.25]
; ZNVER1-NEXT: paddusw (%rdi), %mm0 # sched: [8:0.50]
; ZNVER1-NEXT: movq %mm0, %rax # sched: [2:1.00]
; ZNVER1-NEXT: retq # sched: [1:0.50]
%1 = call x86_mmx @llvm.x86.mmx.paddus.w(x86_mmx %a0, x86_mmx %a1)
%2 = load x86_mmx, x86_mmx *%a2, align 8
%3 = call x86_mmx @llvm.x86.mmx.paddus.w(x86_mmx %1, x86_mmx %2)
%4 = bitcast x86_mmx %3 to i64
ret i64 %4
}
declare x86_mmx @llvm.x86.mmx.paddus.w(x86_mmx, x86_mmx) nounwind readnone
define i64 @test_paddw(x86_mmx %a0, x86_mmx %a1, x86_mmx* %a2) optsize {
; GENERIC-LABEL: test_paddw:
; GENERIC: # %bb.0:
; GENERIC-NEXT: paddw %mm1, %mm0 # sched: [3:1.00]
; GENERIC-NEXT: paddw (%rdi), %mm0 # sched: [8:1.00]
; GENERIC-NEXT: movq %mm0, %rax # sched: [2:1.00]
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_paddw:
; ATOM: # %bb.0:
; ATOM-NEXT: paddw %mm1, %mm0 # sched: [1:0.50]
; ATOM-NEXT: paddw (%rdi), %mm0 # sched: [1:1.00]
; ATOM-NEXT: movq %mm0, %rax # sched: [3:3.00]
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_paddw:
; SLM: # %bb.0:
; SLM-NEXT: paddw %mm1, %mm0 # sched: [1:0.50]
; SLM-NEXT: paddw (%rdi), %mm0 # sched: [4:1.00]
; SLM-NEXT: movq %mm0, %rax # sched: [1:0.50]
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_paddw:
; SANDY: # %bb.0:
; SANDY-NEXT: paddw %mm1, %mm0 # sched: [3:1.00]
; SANDY-NEXT: paddw (%rdi), %mm0 # sched: [8:1.00]
; SANDY-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_paddw:
; HASWELL: # %bb.0:
; HASWELL-NEXT: paddw %mm1, %mm0 # sched: [1:0.50]
; HASWELL-NEXT: paddw (%rdi), %mm0 # sched: [6:0.50]
; HASWELL-NEXT: movq %mm0, %rax # sched: [1:1.00]
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_paddw:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: paddw %mm1, %mm0 # sched: [1:0.50]
; BROADWELL-NEXT: paddw (%rdi), %mm0 # sched: [6:0.50]
; BROADWELL-NEXT: movq %mm0, %rax # sched: [1:1.00]
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_paddw:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: paddw %mm1, %mm0 # sched: [1:0.50]
; SKYLAKE-NEXT: paddw (%rdi), %mm0 # sched: [6:0.50]
; SKYLAKE-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_paddw:
; SKX: # %bb.0:
; SKX-NEXT: paddw %mm1, %mm0 # sched: [1:0.50]
; SKX-NEXT: paddw (%rdi), %mm0 # sched: [6:0.50]
; SKX-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SKX-NEXT: retq # sched: [7:1.00]
;
; BDVER2-LABEL: test_paddw:
; BDVER2: # %bb.0:
; BDVER2-NEXT: paddw %mm1, %mm0 # sched: [2:0.50]
; BDVER2-NEXT: paddw (%rdi), %mm0 # sched: [7:0.50]
; BDVER2-NEXT: movq %mm0, %rax # sched: [10:1.00]
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_paddw:
; BTVER2: # %bb.0:
; BTVER2-NEXT: paddw %mm1, %mm0 # sched: [1:0.50]
; BTVER2-NEXT: paddw (%rdi), %mm0 # sched: [6:1.00]
; BTVER2-NEXT: movq %mm0, %rax # sched: [4:1.00]
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_paddw:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: paddw %mm1, %mm0 # sched: [1:0.25]
; ZNVER1-NEXT: paddw (%rdi), %mm0 # sched: [8:0.50]
; ZNVER1-NEXT: movq %mm0, %rax # sched: [2:1.00]
; ZNVER1-NEXT: retq # sched: [1:0.50]
%1 = call x86_mmx @llvm.x86.mmx.padd.w(x86_mmx %a0, x86_mmx %a1)
%2 = load x86_mmx, x86_mmx *%a2, align 8
%3 = call x86_mmx @llvm.x86.mmx.padd.w(x86_mmx %1, x86_mmx %2)
%4 = bitcast x86_mmx %3 to i64
ret i64 %4
}
declare x86_mmx @llvm.x86.mmx.padd.w(x86_mmx, x86_mmx) nounwind readnone
define i64 @test_palignr(x86_mmx %a0, x86_mmx %a1, x86_mmx* %a2) optsize {
; GENERIC-LABEL: test_palignr:
; GENERIC: # %bb.0:
; GENERIC-NEXT: palignr $1, %mm1, %mm0 # sched: [1:0.50]
; GENERIC-NEXT: palignr $1, (%rdi), %mm0 # sched: [6:0.50]
; GENERIC-NEXT: movq %mm0, %rax # sched: [2:1.00]
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_palignr:
; ATOM: # %bb.0:
; ATOM-NEXT: palignr $1, %mm1, %mm0 # sched: [1:1.00]
; ATOM-NEXT: palignr $1, (%rdi), %mm0 # sched: [1:1.00]
; ATOM-NEXT: movq %mm0, %rax # sched: [3:3.00]
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_palignr:
; SLM: # %bb.0:
; SLM-NEXT: palignr $1, %mm1, %mm0 # sched: [1:1.00]
; SLM-NEXT: palignr $1, (%rdi), %mm0 # sched: [4:1.00]
; SLM-NEXT: movq %mm0, %rax # sched: [1:0.50]
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_palignr:
; SANDY: # %bb.0:
; SANDY-NEXT: palignr $1, %mm1, %mm0 # sched: [1:0.50]
; SANDY-NEXT: palignr $1, (%rdi), %mm0 # sched: [6:0.50]
; SANDY-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_palignr:
; HASWELL: # %bb.0:
; HASWELL-NEXT: palignr $1, %mm1, %mm0 # sched: [1:1.00]
; HASWELL-NEXT: palignr $1, (%rdi), %mm0 # sched: [6:1.00]
; HASWELL-NEXT: movq %mm0, %rax # sched: [1:1.00]
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_palignr:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: palignr $1, %mm1, %mm0 # sched: [1:1.00]
; BROADWELL-NEXT: palignr $1, (%rdi), %mm0 # sched: [6:1.00]
; BROADWELL-NEXT: movq %mm0, %rax # sched: [1:1.00]
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_palignr:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: palignr $1, %mm1, %mm0 # sched: [1:1.00]
; SKYLAKE-NEXT: palignr $1, (%rdi), %mm0 # sched: [6:1.00]
; SKYLAKE-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_palignr:
; SKX: # %bb.0:
; SKX-NEXT: palignr $1, %mm1, %mm0 # sched: [1:1.00]
; SKX-NEXT: palignr $1, (%rdi), %mm0 # sched: [6:1.00]
; SKX-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SKX-NEXT: retq # sched: [7:1.00]
;
; BDVER2-LABEL: test_palignr:
; BDVER2: # %bb.0:
; BDVER2-NEXT: palignr $1, %mm1, %mm0 # sched: [2:0.50]
; BDVER2-NEXT: palignr $1, (%rdi), %mm0 # sched: [7:0.50]
; BDVER2-NEXT: movq %mm0, %rax # sched: [10:1.00]
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_palignr:
; BTVER2: # %bb.0:
; BTVER2-NEXT: palignr $1, %mm1, %mm0 # sched: [1:0.50]
; BTVER2-NEXT: palignr $1, (%rdi), %mm0 # sched: [6:1.00]
; BTVER2-NEXT: movq %mm0, %rax # sched: [4:1.00]
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_palignr:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: palignr $1, %mm1, %mm0 # sched: [1:0.25]
; ZNVER1-NEXT: palignr $1, (%rdi), %mm0 # sched: [8:0.50]
; ZNVER1-NEXT: movq %mm0, %rax # sched: [2:1.00]
; ZNVER1-NEXT: retq # sched: [1:0.50]
%1 = call x86_mmx @llvm.x86.mmx.palignr.b(x86_mmx %a0, x86_mmx %a1, i8 1)
%2 = load x86_mmx, x86_mmx *%a2, align 8
%3 = call x86_mmx @llvm.x86.mmx.palignr.b(x86_mmx %1, x86_mmx %2, i8 1)
%4 = bitcast x86_mmx %3 to i64
ret i64 %4
}
declare x86_mmx @llvm.x86.mmx.palignr.b(x86_mmx, x86_mmx, i8) nounwind readnone
define i64 @test_pand(x86_mmx %a0, x86_mmx %a1, x86_mmx* %a2) optsize {
; GENERIC-LABEL: test_pand:
; GENERIC: # %bb.0:
; GENERIC-NEXT: pand %mm1, %mm0 # sched: [1:0.33]
; GENERIC-NEXT: pand (%rdi), %mm0 # sched: [6:0.50]
; GENERIC-NEXT: movq %mm0, %rax # sched: [2:1.00]
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_pand:
; ATOM: # %bb.0:
; ATOM-NEXT: pand %mm1, %mm0 # sched: [1:0.50]
; ATOM-NEXT: pand (%rdi), %mm0 # sched: [1:1.00]
; ATOM-NEXT: movq %mm0, %rax # sched: [3:3.00]
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_pand:
; SLM: # %bb.0:
; SLM-NEXT: pand %mm1, %mm0 # sched: [1:0.50]
; SLM-NEXT: pand (%rdi), %mm0 # sched: [4:1.00]
; SLM-NEXT: movq %mm0, %rax # sched: [1:0.50]
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_pand:
; SANDY: # %bb.0:
; SANDY-NEXT: pand %mm1, %mm0 # sched: [1:0.33]
; SANDY-NEXT: pand (%rdi), %mm0 # sched: [6:0.50]
; SANDY-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_pand:
; HASWELL: # %bb.0:
; HASWELL-NEXT: pand %mm1, %mm0 # sched: [1:0.33]
; HASWELL-NEXT: pand (%rdi), %mm0 # sched: [6:0.50]
; HASWELL-NEXT: movq %mm0, %rax # sched: [1:1.00]
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_pand:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: pand %mm1, %mm0 # sched: [1:0.33]
; BROADWELL-NEXT: pand (%rdi), %mm0 # sched: [6:0.50]
; BROADWELL-NEXT: movq %mm0, %rax # sched: [1:1.00]
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_pand:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: pand %mm1, %mm0 # sched: [1:0.50]
; SKYLAKE-NEXT: pand (%rdi), %mm0 # sched: [6:0.50]
; SKYLAKE-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_pand:
; SKX: # %bb.0:
; SKX-NEXT: pand %mm1, %mm0 # sched: [1:0.50]
; SKX-NEXT: pand (%rdi), %mm0 # sched: [6:0.50]
; SKX-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SKX-NEXT: retq # sched: [7:1.00]
;
; BDVER2-LABEL: test_pand:
; BDVER2: # %bb.0:
; BDVER2-NEXT: pand %mm1, %mm0 # sched: [2:0.50]
; BDVER2-NEXT: pand (%rdi), %mm0 # sched: [7:0.50]
; BDVER2-NEXT: movq %mm0, %rax # sched: [10:1.00]
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_pand:
; BTVER2: # %bb.0:
; BTVER2-NEXT: pand %mm1, %mm0 # sched: [1:0.50]
; BTVER2-NEXT: pand (%rdi), %mm0 # sched: [6:1.00]
; BTVER2-NEXT: movq %mm0, %rax # sched: [4:1.00]
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_pand:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: pand %mm1, %mm0 # sched: [1:0.25]
; ZNVER1-NEXT: pand (%rdi), %mm0 # sched: [8:0.50]
; ZNVER1-NEXT: movq %mm0, %rax # sched: [2:1.00]
; ZNVER1-NEXT: retq # sched: [1:0.50]
%1 = call x86_mmx @llvm.x86.mmx.pand(x86_mmx %a0, x86_mmx %a1)
%2 = load x86_mmx, x86_mmx *%a2, align 8
%3 = call x86_mmx @llvm.x86.mmx.pand(x86_mmx %1, x86_mmx %2)
%4 = bitcast x86_mmx %3 to i64
ret i64 %4
}
declare x86_mmx @llvm.x86.mmx.pand(x86_mmx, x86_mmx) nounwind readnone
define i64 @test_pandn(x86_mmx %a0, x86_mmx %a1, x86_mmx* %a2) optsize {
; GENERIC-LABEL: test_pandn:
; GENERIC: # %bb.0:
; GENERIC-NEXT: pandn %mm1, %mm0 # sched: [1:0.33]
; GENERIC-NEXT: pandn (%rdi), %mm0 # sched: [6:0.50]
; GENERIC-NEXT: movq %mm0, %rax # sched: [2:1.00]
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_pandn:
; ATOM: # %bb.0:
; ATOM-NEXT: pandn %mm1, %mm0 # sched: [1:0.50]
; ATOM-NEXT: pandn (%rdi), %mm0 # sched: [1:1.00]
; ATOM-NEXT: movq %mm0, %rax # sched: [3:3.00]
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_pandn:
; SLM: # %bb.0:
; SLM-NEXT: pandn %mm1, %mm0 # sched: [1:0.50]
; SLM-NEXT: pandn (%rdi), %mm0 # sched: [4:1.00]
; SLM-NEXT: movq %mm0, %rax # sched: [1:0.50]
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_pandn:
; SANDY: # %bb.0:
; SANDY-NEXT: pandn %mm1, %mm0 # sched: [1:0.33]
; SANDY-NEXT: pandn (%rdi), %mm0 # sched: [6:0.50]
; SANDY-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_pandn:
; HASWELL: # %bb.0:
; HASWELL-NEXT: pandn %mm1, %mm0 # sched: [1:0.33]
; HASWELL-NEXT: pandn (%rdi), %mm0 # sched: [6:0.50]
; HASWELL-NEXT: movq %mm0, %rax # sched: [1:1.00]
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_pandn:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: pandn %mm1, %mm0 # sched: [1:0.33]
; BROADWELL-NEXT: pandn (%rdi), %mm0 # sched: [6:0.50]
; BROADWELL-NEXT: movq %mm0, %rax # sched: [1:1.00]
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_pandn:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: pandn %mm1, %mm0 # sched: [1:0.50]
; SKYLAKE-NEXT: pandn (%rdi), %mm0 # sched: [6:0.50]
; SKYLAKE-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_pandn:
; SKX: # %bb.0:
; SKX-NEXT: pandn %mm1, %mm0 # sched: [1:0.50]
; SKX-NEXT: pandn (%rdi), %mm0 # sched: [6:0.50]
; SKX-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SKX-NEXT: retq # sched: [7:1.00]
;
; BDVER2-LABEL: test_pandn:
; BDVER2: # %bb.0:
; BDVER2-NEXT: pandn %mm1, %mm0 # sched: [2:0.50]
; BDVER2-NEXT: pandn (%rdi), %mm0 # sched: [7:0.50]
; BDVER2-NEXT: movq %mm0, %rax # sched: [10:1.00]
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_pandn:
; BTVER2: # %bb.0:
; BTVER2-NEXT: pandn %mm1, %mm0 # sched: [1:0.50]
; BTVER2-NEXT: pandn (%rdi), %mm0 # sched: [6:1.00]
; BTVER2-NEXT: movq %mm0, %rax # sched: [4:1.00]
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_pandn:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: pandn %mm1, %mm0 # sched: [1:0.25]
; ZNVER1-NEXT: pandn (%rdi), %mm0 # sched: [8:0.50]
; ZNVER1-NEXT: movq %mm0, %rax # sched: [2:1.00]
; ZNVER1-NEXT: retq # sched: [1:0.50]
%1 = call x86_mmx @llvm.x86.mmx.pandn(x86_mmx %a0, x86_mmx %a1)
%2 = load x86_mmx, x86_mmx *%a2, align 8
%3 = call x86_mmx @llvm.x86.mmx.pandn(x86_mmx %1, x86_mmx %2)
%4 = bitcast x86_mmx %3 to i64
ret i64 %4
}
declare x86_mmx @llvm.x86.mmx.pandn(x86_mmx, x86_mmx) nounwind readnone
define i64 @test_pavgb(x86_mmx %a0, x86_mmx %a1, x86_mmx* %a2) optsize {
; GENERIC-LABEL: test_pavgb:
; GENERIC: # %bb.0:
; GENERIC-NEXT: pavgb %mm1, %mm0 # sched: [3:1.00]
; GENERIC-NEXT: pavgb (%rdi), %mm0 # sched: [8:1.00]
; GENERIC-NEXT: movq %mm0, %rax # sched: [2:1.00]
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_pavgb:
; ATOM: # %bb.0:
; ATOM-NEXT: pavgb %mm1, %mm0 # sched: [1:0.50]
; ATOM-NEXT: pavgb (%rdi), %mm0 # sched: [1:1.00]
; ATOM-NEXT: movq %mm0, %rax # sched: [3:3.00]
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_pavgb:
; SLM: # %bb.0:
; SLM-NEXT: pavgb %mm1, %mm0 # sched: [1:0.50]
; SLM-NEXT: pavgb (%rdi), %mm0 # sched: [4:1.00]
; SLM-NEXT: movq %mm0, %rax # sched: [1:0.50]
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_pavgb:
; SANDY: # %bb.0:
; SANDY-NEXT: pavgb %mm1, %mm0 # sched: [3:1.00]
; SANDY-NEXT: pavgb (%rdi), %mm0 # sched: [8:1.00]
; SANDY-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_pavgb:
; HASWELL: # %bb.0:
; HASWELL-NEXT: pavgb %mm1, %mm0 # sched: [1:0.50]
; HASWELL-NEXT: pavgb (%rdi), %mm0 # sched: [6:0.50]
; HASWELL-NEXT: movq %mm0, %rax # sched: [1:1.00]
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_pavgb:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: pavgb %mm1, %mm0 # sched: [1:0.50]
; BROADWELL-NEXT: pavgb (%rdi), %mm0 # sched: [6:0.50]
; BROADWELL-NEXT: movq %mm0, %rax # sched: [1:1.00]
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_pavgb:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: pavgb %mm1, %mm0 # sched: [1:1.00]
; SKYLAKE-NEXT: pavgb (%rdi), %mm0 # sched: [6:1.00]
; SKYLAKE-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_pavgb:
; SKX: # %bb.0:
; SKX-NEXT: pavgb %mm1, %mm0 # sched: [1:1.00]
; SKX-NEXT: pavgb (%rdi), %mm0 # sched: [6:1.00]
; SKX-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SKX-NEXT: retq # sched: [7:1.00]
;
; BDVER2-LABEL: test_pavgb:
; BDVER2: # %bb.0:
; BDVER2-NEXT: pavgb %mm1, %mm0 # sched: [2:0.50]
; BDVER2-NEXT: pavgb (%rdi), %mm0 # sched: [7:0.50]
; BDVER2-NEXT: movq %mm0, %rax # sched: [10:1.00]
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_pavgb:
; BTVER2: # %bb.0:
; BTVER2-NEXT: pavgb %mm1, %mm0 # sched: [1:0.50]
; BTVER2-NEXT: pavgb (%rdi), %mm0 # sched: [6:1.00]
; BTVER2-NEXT: movq %mm0, %rax # sched: [4:1.00]
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_pavgb:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: pavgb %mm1, %mm0 # sched: [1:0.25]
; ZNVER1-NEXT: pavgb (%rdi), %mm0 # sched: [8:0.50]
; ZNVER1-NEXT: movq %mm0, %rax # sched: [2:1.00]
; ZNVER1-NEXT: retq # sched: [1:0.50]
%1 = call x86_mmx @llvm.x86.mmx.pavg.b(x86_mmx %a0, x86_mmx %a1)
%2 = load x86_mmx, x86_mmx *%a2, align 8
%3 = call x86_mmx @llvm.x86.mmx.pavg.b(x86_mmx %1, x86_mmx %2)
%4 = bitcast x86_mmx %3 to i64
ret i64 %4
}
declare x86_mmx @llvm.x86.mmx.pavg.b(x86_mmx, x86_mmx) nounwind readnone
define i64 @test_pavgw(x86_mmx %a0, x86_mmx %a1, x86_mmx* %a2) optsize {
; GENERIC-LABEL: test_pavgw:
; GENERIC: # %bb.0:
; GENERIC-NEXT: pavgw %mm1, %mm0 # sched: [3:1.00]
; GENERIC-NEXT: pavgw (%rdi), %mm0 # sched: [8:1.00]
; GENERIC-NEXT: movq %mm0, %rax # sched: [2:1.00]
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_pavgw:
; ATOM: # %bb.0:
; ATOM-NEXT: pavgw %mm1, %mm0 # sched: [1:0.50]
; ATOM-NEXT: pavgw (%rdi), %mm0 # sched: [1:1.00]
; ATOM-NEXT: movq %mm0, %rax # sched: [3:3.00]
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_pavgw:
; SLM: # %bb.0:
; SLM-NEXT: pavgw %mm1, %mm0 # sched: [1:0.50]
; SLM-NEXT: pavgw (%rdi), %mm0 # sched: [4:1.00]
; SLM-NEXT: movq %mm0, %rax # sched: [1:0.50]
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_pavgw:
; SANDY: # %bb.0:
; SANDY-NEXT: pavgw %mm1, %mm0 # sched: [3:1.00]
; SANDY-NEXT: pavgw (%rdi), %mm0 # sched: [8:1.00]
; SANDY-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_pavgw:
; HASWELL: # %bb.0:
; HASWELL-NEXT: pavgw %mm1, %mm0 # sched: [1:0.50]
; HASWELL-NEXT: pavgw (%rdi), %mm0 # sched: [6:0.50]
; HASWELL-NEXT: movq %mm0, %rax # sched: [1:1.00]
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_pavgw:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: pavgw %mm1, %mm0 # sched: [1:0.50]
; BROADWELL-NEXT: pavgw (%rdi), %mm0 # sched: [6:0.50]
; BROADWELL-NEXT: movq %mm0, %rax # sched: [1:1.00]
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_pavgw:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: pavgw %mm1, %mm0 # sched: [1:1.00]
; SKYLAKE-NEXT: pavgw (%rdi), %mm0 # sched: [6:1.00]
; SKYLAKE-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_pavgw:
; SKX: # %bb.0:
; SKX-NEXT: pavgw %mm1, %mm0 # sched: [1:1.00]
; SKX-NEXT: pavgw (%rdi), %mm0 # sched: [6:1.00]
; SKX-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SKX-NEXT: retq # sched: [7:1.00]
;
; BDVER2-LABEL: test_pavgw:
; BDVER2: # %bb.0:
; BDVER2-NEXT: pavgw %mm1, %mm0 # sched: [2:0.50]
; BDVER2-NEXT: pavgw (%rdi), %mm0 # sched: [7:0.50]
; BDVER2-NEXT: movq %mm0, %rax # sched: [10:1.00]
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_pavgw:
; BTVER2: # %bb.0:
; BTVER2-NEXT: pavgw %mm1, %mm0 # sched: [1:0.50]
; BTVER2-NEXT: pavgw (%rdi), %mm0 # sched: [6:1.00]
; BTVER2-NEXT: movq %mm0, %rax # sched: [4:1.00]
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_pavgw:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: pavgw %mm1, %mm0 # sched: [1:0.25]
; ZNVER1-NEXT: pavgw (%rdi), %mm0 # sched: [8:0.50]
; ZNVER1-NEXT: movq %mm0, %rax # sched: [2:1.00]
; ZNVER1-NEXT: retq # sched: [1:0.50]
%1 = call x86_mmx @llvm.x86.mmx.pavg.w(x86_mmx %a0, x86_mmx %a1)
%2 = load x86_mmx, x86_mmx *%a2, align 8
%3 = call x86_mmx @llvm.x86.mmx.pavg.w(x86_mmx %1, x86_mmx %2)
%4 = bitcast x86_mmx %3 to i64
ret i64 %4
}
declare x86_mmx @llvm.x86.mmx.pavg.w(x86_mmx, x86_mmx) nounwind readnone
define i64 @test_pcmpeqb(x86_mmx %a0, x86_mmx %a1, x86_mmx* %a2) optsize {
; GENERIC-LABEL: test_pcmpeqb:
; GENERIC: # %bb.0:
; GENERIC-NEXT: pcmpeqb %mm1, %mm0 # sched: [3:1.00]
; GENERIC-NEXT: pcmpeqb (%rdi), %mm0 # sched: [8:1.00]
; GENERIC-NEXT: movq %mm0, %rax # sched: [2:1.00]
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_pcmpeqb:
; ATOM: # %bb.0:
; ATOM-NEXT: pcmpeqb %mm1, %mm0 # sched: [1:0.50]
; ATOM-NEXT: pcmpeqb (%rdi), %mm0 # sched: [1:1.00]
; ATOM-NEXT: movq %mm0, %rax # sched: [3:3.00]
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_pcmpeqb:
; SLM: # %bb.0:
; SLM-NEXT: pcmpeqb %mm1, %mm0 # sched: [1:0.50]
; SLM-NEXT: pcmpeqb (%rdi), %mm0 # sched: [4:1.00]
; SLM-NEXT: movq %mm0, %rax # sched: [1:0.50]
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_pcmpeqb:
; SANDY: # %bb.0:
; SANDY-NEXT: pcmpeqb %mm1, %mm0 # sched: [3:1.00]
; SANDY-NEXT: pcmpeqb (%rdi), %mm0 # sched: [8:1.00]
; SANDY-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_pcmpeqb:
; HASWELL: # %bb.0:
; HASWELL-NEXT: pcmpeqb %mm1, %mm0 # sched: [1:0.50]
; HASWELL-NEXT: pcmpeqb (%rdi), %mm0 # sched: [6:0.50]
; HASWELL-NEXT: movq %mm0, %rax # sched: [1:1.00]
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_pcmpeqb:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: pcmpeqb %mm1, %mm0 # sched: [1:0.50]
; BROADWELL-NEXT: pcmpeqb (%rdi), %mm0 # sched: [6:0.50]
; BROADWELL-NEXT: movq %mm0, %rax # sched: [1:1.00]
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_pcmpeqb:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: pcmpeqb %mm1, %mm0 # sched: [1:1.00]
; SKYLAKE-NEXT: pcmpeqb (%rdi), %mm0 # sched: [6:1.00]
; SKYLAKE-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_pcmpeqb:
; SKX: # %bb.0:
; SKX-NEXT: pcmpeqb %mm1, %mm0 # sched: [1:1.00]
; SKX-NEXT: pcmpeqb (%rdi), %mm0 # sched: [6:1.00]
; SKX-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SKX-NEXT: retq # sched: [7:1.00]
;
; BDVER2-LABEL: test_pcmpeqb:
; BDVER2: # %bb.0:
; BDVER2-NEXT: pcmpeqb %mm1, %mm0 # sched: [2:0.50]
; BDVER2-NEXT: pcmpeqb (%rdi), %mm0 # sched: [7:0.50]
; BDVER2-NEXT: movq %mm0, %rax # sched: [10:1.00]
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_pcmpeqb:
; BTVER2: # %bb.0:
; BTVER2-NEXT: pcmpeqb %mm1, %mm0 # sched: [1:0.50]
; BTVER2-NEXT: pcmpeqb (%rdi), %mm0 # sched: [6:1.00]
; BTVER2-NEXT: movq %mm0, %rax # sched: [4:1.00]
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_pcmpeqb:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: pcmpeqb %mm1, %mm0 # sched: [1:0.25]
; ZNVER1-NEXT: pcmpeqb (%rdi), %mm0 # sched: [8:0.50]
; ZNVER1-NEXT: movq %mm0, %rax # sched: [2:1.00]
; ZNVER1-NEXT: retq # sched: [1:0.50]
%1 = call x86_mmx @llvm.x86.mmx.pcmpeq.b(x86_mmx %a0, x86_mmx %a1)
%2 = load x86_mmx, x86_mmx *%a2, align 8
%3 = call x86_mmx @llvm.x86.mmx.pcmpeq.b(x86_mmx %1, x86_mmx %2)
%4 = bitcast x86_mmx %3 to i64
ret i64 %4
}
declare x86_mmx @llvm.x86.mmx.pcmpeq.b(x86_mmx, x86_mmx) nounwind readnone
define i64 @test_pcmpeqd(x86_mmx %a0, x86_mmx %a1, x86_mmx* %a2) optsize {
; GENERIC-LABEL: test_pcmpeqd:
; GENERIC: # %bb.0:
; GENERIC-NEXT: pcmpeqd %mm1, %mm0 # sched: [3:1.00]
; GENERIC-NEXT: pcmpeqd (%rdi), %mm0 # sched: [8:1.00]
; GENERIC-NEXT: movq %mm0, %rax # sched: [2:1.00]
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_pcmpeqd:
; ATOM: # %bb.0:
; ATOM-NEXT: pcmpeqd %mm1, %mm0 # sched: [1:0.50]
; ATOM-NEXT: pcmpeqd (%rdi), %mm0 # sched: [1:1.00]
; ATOM-NEXT: movq %mm0, %rax # sched: [3:3.00]
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_pcmpeqd:
; SLM: # %bb.0:
; SLM-NEXT: pcmpeqd %mm1, %mm0 # sched: [1:0.50]
; SLM-NEXT: pcmpeqd (%rdi), %mm0 # sched: [4:1.00]
; SLM-NEXT: movq %mm0, %rax # sched: [1:0.50]
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_pcmpeqd:
; SANDY: # %bb.0:
; SANDY-NEXT: pcmpeqd %mm1, %mm0 # sched: [3:1.00]
; SANDY-NEXT: pcmpeqd (%rdi), %mm0 # sched: [8:1.00]
; SANDY-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_pcmpeqd:
; HASWELL: # %bb.0:
; HASWELL-NEXT: pcmpeqd %mm1, %mm0 # sched: [1:0.50]
; HASWELL-NEXT: pcmpeqd (%rdi), %mm0 # sched: [6:0.50]
; HASWELL-NEXT: movq %mm0, %rax # sched: [1:1.00]
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_pcmpeqd:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: pcmpeqd %mm1, %mm0 # sched: [1:0.50]
; BROADWELL-NEXT: pcmpeqd (%rdi), %mm0 # sched: [6:0.50]
; BROADWELL-NEXT: movq %mm0, %rax # sched: [1:1.00]
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_pcmpeqd:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: pcmpeqd %mm1, %mm0 # sched: [1:1.00]
; SKYLAKE-NEXT: pcmpeqd (%rdi), %mm0 # sched: [6:1.00]
; SKYLAKE-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_pcmpeqd:
; SKX: # %bb.0:
; SKX-NEXT: pcmpeqd %mm1, %mm0 # sched: [1:1.00]
; SKX-NEXT: pcmpeqd (%rdi), %mm0 # sched: [6:1.00]
; SKX-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SKX-NEXT: retq # sched: [7:1.00]
;
; BDVER2-LABEL: test_pcmpeqd:
; BDVER2: # %bb.0:
; BDVER2-NEXT: pcmpeqd %mm1, %mm0 # sched: [2:0.50]
; BDVER2-NEXT: pcmpeqd (%rdi), %mm0 # sched: [7:0.50]
; BDVER2-NEXT: movq %mm0, %rax # sched: [10:1.00]
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_pcmpeqd:
; BTVER2: # %bb.0:
; BTVER2-NEXT: pcmpeqd %mm1, %mm0 # sched: [1:0.50]
; BTVER2-NEXT: pcmpeqd (%rdi), %mm0 # sched: [6:1.00]
; BTVER2-NEXT: movq %mm0, %rax # sched: [4:1.00]
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_pcmpeqd:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: pcmpeqd %mm1, %mm0 # sched: [1:0.25]
; ZNVER1-NEXT: pcmpeqd (%rdi), %mm0 # sched: [8:0.50]
; ZNVER1-NEXT: movq %mm0, %rax # sched: [2:1.00]
; ZNVER1-NEXT: retq # sched: [1:0.50]
%1 = call x86_mmx @llvm.x86.mmx.pcmpeq.d(x86_mmx %a0, x86_mmx %a1)
%2 = load x86_mmx, x86_mmx *%a2, align 8
%3 = call x86_mmx @llvm.x86.mmx.pcmpeq.d(x86_mmx %1, x86_mmx %2)
%4 = bitcast x86_mmx %3 to i64
ret i64 %4
}
declare x86_mmx @llvm.x86.mmx.pcmpeq.d(x86_mmx, x86_mmx) nounwind readnone
define i64 @test_pcmpeqw(x86_mmx %a0, x86_mmx %a1, x86_mmx* %a2) optsize {
; GENERIC-LABEL: test_pcmpeqw:
; GENERIC: # %bb.0:
; GENERIC-NEXT: pcmpeqw %mm1, %mm0 # sched: [3:1.00]
; GENERIC-NEXT: pcmpeqw (%rdi), %mm0 # sched: [8:1.00]
; GENERIC-NEXT: movq %mm0, %rax # sched: [2:1.00]
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_pcmpeqw:
; ATOM: # %bb.0:
; ATOM-NEXT: pcmpeqw %mm1, %mm0 # sched: [1:0.50]
; ATOM-NEXT: pcmpeqw (%rdi), %mm0 # sched: [1:1.00]
; ATOM-NEXT: movq %mm0, %rax # sched: [3:3.00]
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_pcmpeqw:
; SLM: # %bb.0:
; SLM-NEXT: pcmpeqw %mm1, %mm0 # sched: [1:0.50]
; SLM-NEXT: pcmpeqw (%rdi), %mm0 # sched: [4:1.00]
; SLM-NEXT: movq %mm0, %rax # sched: [1:0.50]
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_pcmpeqw:
; SANDY: # %bb.0:
; SANDY-NEXT: pcmpeqw %mm1, %mm0 # sched: [3:1.00]
; SANDY-NEXT: pcmpeqw (%rdi), %mm0 # sched: [8:1.00]
; SANDY-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_pcmpeqw:
; HASWELL: # %bb.0:
; HASWELL-NEXT: pcmpeqw %mm1, %mm0 # sched: [1:0.50]
; HASWELL-NEXT: pcmpeqw (%rdi), %mm0 # sched: [6:0.50]
; HASWELL-NEXT: movq %mm0, %rax # sched: [1:1.00]
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_pcmpeqw:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: pcmpeqw %mm1, %mm0 # sched: [1:0.50]
; BROADWELL-NEXT: pcmpeqw (%rdi), %mm0 # sched: [6:0.50]
; BROADWELL-NEXT: movq %mm0, %rax # sched: [1:1.00]
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_pcmpeqw:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: pcmpeqw %mm1, %mm0 # sched: [1:1.00]
; SKYLAKE-NEXT: pcmpeqw (%rdi), %mm0 # sched: [6:1.00]
; SKYLAKE-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_pcmpeqw:
; SKX: # %bb.0:
; SKX-NEXT: pcmpeqw %mm1, %mm0 # sched: [1:1.00]
; SKX-NEXT: pcmpeqw (%rdi), %mm0 # sched: [6:1.00]
; SKX-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SKX-NEXT: retq # sched: [7:1.00]
;
; BDVER2-LABEL: test_pcmpeqw:
; BDVER2: # %bb.0:
; BDVER2-NEXT: pcmpeqw %mm1, %mm0 # sched: [2:0.50]
; BDVER2-NEXT: pcmpeqw (%rdi), %mm0 # sched: [7:0.50]
; BDVER2-NEXT: movq %mm0, %rax # sched: [10:1.00]
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_pcmpeqw:
; BTVER2: # %bb.0:
; BTVER2-NEXT: pcmpeqw %mm1, %mm0 # sched: [1:0.50]
; BTVER2-NEXT: pcmpeqw (%rdi), %mm0 # sched: [6:1.00]
; BTVER2-NEXT: movq %mm0, %rax # sched: [4:1.00]
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_pcmpeqw:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: pcmpeqw %mm1, %mm0 # sched: [1:0.25]
; ZNVER1-NEXT: pcmpeqw (%rdi), %mm0 # sched: [8:0.50]
; ZNVER1-NEXT: movq %mm0, %rax # sched: [2:1.00]
; ZNVER1-NEXT: retq # sched: [1:0.50]
%1 = call x86_mmx @llvm.x86.mmx.pcmpeq.w(x86_mmx %a0, x86_mmx %a1)
%2 = load x86_mmx, x86_mmx *%a2, align 8
%3 = call x86_mmx @llvm.x86.mmx.pcmpeq.w(x86_mmx %1, x86_mmx %2)
%4 = bitcast x86_mmx %3 to i64
ret i64 %4
}
declare x86_mmx @llvm.x86.mmx.pcmpeq.w(x86_mmx, x86_mmx) nounwind readnone
define i64 @test_pcmpgtb(x86_mmx %a0, x86_mmx %a1, x86_mmx* %a2) optsize {
; GENERIC-LABEL: test_pcmpgtb:
; GENERIC: # %bb.0:
; GENERIC-NEXT: pcmpgtb %mm1, %mm0 # sched: [3:1.00]
; GENERIC-NEXT: pcmpgtb (%rdi), %mm0 # sched: [8:1.00]
; GENERIC-NEXT: movq %mm0, %rax # sched: [2:1.00]
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_pcmpgtb:
; ATOM: # %bb.0:
; ATOM-NEXT: pcmpgtb %mm1, %mm0 # sched: [1:0.50]
; ATOM-NEXT: pcmpgtb (%rdi), %mm0 # sched: [1:1.00]
; ATOM-NEXT: movq %mm0, %rax # sched: [3:3.00]
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_pcmpgtb:
; SLM: # %bb.0:
; SLM-NEXT: pcmpgtb %mm1, %mm0 # sched: [1:0.50]
; SLM-NEXT: pcmpgtb (%rdi), %mm0 # sched: [4:1.00]
; SLM-NEXT: movq %mm0, %rax # sched: [1:0.50]
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_pcmpgtb:
; SANDY: # %bb.0:
; SANDY-NEXT: pcmpgtb %mm1, %mm0 # sched: [3:1.00]
; SANDY-NEXT: pcmpgtb (%rdi), %mm0 # sched: [8:1.00]
; SANDY-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_pcmpgtb:
; HASWELL: # %bb.0:
; HASWELL-NEXT: pcmpgtb %mm1, %mm0 # sched: [1:0.50]
; HASWELL-NEXT: pcmpgtb (%rdi), %mm0 # sched: [6:0.50]
; HASWELL-NEXT: movq %mm0, %rax # sched: [1:1.00]
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_pcmpgtb:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: pcmpgtb %mm1, %mm0 # sched: [1:0.50]
; BROADWELL-NEXT: pcmpgtb (%rdi), %mm0 # sched: [6:0.50]
; BROADWELL-NEXT: movq %mm0, %rax # sched: [1:1.00]
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_pcmpgtb:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: pcmpgtb %mm1, %mm0 # sched: [1:1.00]
; SKYLAKE-NEXT: pcmpgtb (%rdi), %mm0 # sched: [6:1.00]
; SKYLAKE-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_pcmpgtb:
; SKX: # %bb.0:
; SKX-NEXT: pcmpgtb %mm1, %mm0 # sched: [1:1.00]
; SKX-NEXT: pcmpgtb (%rdi), %mm0 # sched: [6:1.00]
; SKX-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SKX-NEXT: retq # sched: [7:1.00]
;
; BDVER2-LABEL: test_pcmpgtb:
; BDVER2: # %bb.0:
; BDVER2-NEXT: pcmpgtb %mm1, %mm0 # sched: [2:0.50]
; BDVER2-NEXT: pcmpgtb (%rdi), %mm0 # sched: [7:0.50]
; BDVER2-NEXT: movq %mm0, %rax # sched: [10:1.00]
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_pcmpgtb:
; BTVER2: # %bb.0:
; BTVER2-NEXT: pcmpgtb %mm1, %mm0 # sched: [1:0.50]
; BTVER2-NEXT: pcmpgtb (%rdi), %mm0 # sched: [6:1.00]
; BTVER2-NEXT: movq %mm0, %rax # sched: [4:1.00]
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_pcmpgtb:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: pcmpgtb %mm1, %mm0 # sched: [1:0.25]
; ZNVER1-NEXT: pcmpgtb (%rdi), %mm0 # sched: [8:0.50]
; ZNVER1-NEXT: movq %mm0, %rax # sched: [2:1.00]
; ZNVER1-NEXT: retq # sched: [1:0.50]
%1 = call x86_mmx @llvm.x86.mmx.pcmpgt.b(x86_mmx %a0, x86_mmx %a1)
%2 = load x86_mmx, x86_mmx *%a2, align 8
%3 = call x86_mmx @llvm.x86.mmx.pcmpgt.b(x86_mmx %1, x86_mmx %2)
%4 = bitcast x86_mmx %3 to i64
ret i64 %4
}
declare x86_mmx @llvm.x86.mmx.pcmpgt.b(x86_mmx, x86_mmx) nounwind readnone
define i64 @test_pcmpgtd(x86_mmx %a0, x86_mmx %a1, x86_mmx* %a2) optsize {
; GENERIC-LABEL: test_pcmpgtd:
; GENERIC: # %bb.0:
; GENERIC-NEXT: pcmpgtd %mm1, %mm0 # sched: [3:1.00]
; GENERIC-NEXT: pcmpgtd (%rdi), %mm0 # sched: [8:1.00]
; GENERIC-NEXT: movq %mm0, %rax # sched: [2:1.00]
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_pcmpgtd:
; ATOM: # %bb.0:
; ATOM-NEXT: pcmpgtd %mm1, %mm0 # sched: [1:0.50]
; ATOM-NEXT: pcmpgtd (%rdi), %mm0 # sched: [1:1.00]
; ATOM-NEXT: movq %mm0, %rax # sched: [3:3.00]
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_pcmpgtd:
; SLM: # %bb.0:
; SLM-NEXT: pcmpgtd %mm1, %mm0 # sched: [1:0.50]
; SLM-NEXT: pcmpgtd (%rdi), %mm0 # sched: [4:1.00]
; SLM-NEXT: movq %mm0, %rax # sched: [1:0.50]
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_pcmpgtd:
; SANDY: # %bb.0:
; SANDY-NEXT: pcmpgtd %mm1, %mm0 # sched: [3:1.00]
; SANDY-NEXT: pcmpgtd (%rdi), %mm0 # sched: [8:1.00]
; SANDY-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_pcmpgtd:
; HASWELL: # %bb.0:
; HASWELL-NEXT: pcmpgtd %mm1, %mm0 # sched: [1:0.50]
; HASWELL-NEXT: pcmpgtd (%rdi), %mm0 # sched: [6:0.50]
; HASWELL-NEXT: movq %mm0, %rax # sched: [1:1.00]
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_pcmpgtd:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: pcmpgtd %mm1, %mm0 # sched: [1:0.50]
; BROADWELL-NEXT: pcmpgtd (%rdi), %mm0 # sched: [6:0.50]
; BROADWELL-NEXT: movq %mm0, %rax # sched: [1:1.00]
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_pcmpgtd:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: pcmpgtd %mm1, %mm0 # sched: [1:1.00]
; SKYLAKE-NEXT: pcmpgtd (%rdi), %mm0 # sched: [6:1.00]
; SKYLAKE-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_pcmpgtd:
; SKX: # %bb.0:
; SKX-NEXT: pcmpgtd %mm1, %mm0 # sched: [1:1.00]
; SKX-NEXT: pcmpgtd (%rdi), %mm0 # sched: [6:1.00]
; SKX-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SKX-NEXT: retq # sched: [7:1.00]
;
; BDVER2-LABEL: test_pcmpgtd:
; BDVER2: # %bb.0:
; BDVER2-NEXT: pcmpgtd %mm1, %mm0 # sched: [2:0.50]
; BDVER2-NEXT: pcmpgtd (%rdi), %mm0 # sched: [7:0.50]
; BDVER2-NEXT: movq %mm0, %rax # sched: [10:1.00]
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_pcmpgtd:
; BTVER2: # %bb.0:
; BTVER2-NEXT: pcmpgtd %mm1, %mm0 # sched: [1:0.50]
; BTVER2-NEXT: pcmpgtd (%rdi), %mm0 # sched: [6:1.00]
; BTVER2-NEXT: movq %mm0, %rax # sched: [4:1.00]
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_pcmpgtd:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: pcmpgtd %mm1, %mm0 # sched: [1:0.25]
; ZNVER1-NEXT: pcmpgtd (%rdi), %mm0 # sched: [8:0.50]
; ZNVER1-NEXT: movq %mm0, %rax # sched: [2:1.00]
; ZNVER1-NEXT: retq # sched: [1:0.50]
%1 = call x86_mmx @llvm.x86.mmx.pcmpgt.d(x86_mmx %a0, x86_mmx %a1)
%2 = load x86_mmx, x86_mmx *%a2, align 8
%3 = call x86_mmx @llvm.x86.mmx.pcmpgt.d(x86_mmx %1, x86_mmx %2)
%4 = bitcast x86_mmx %3 to i64
ret i64 %4
}
declare x86_mmx @llvm.x86.mmx.pcmpgt.d(x86_mmx, x86_mmx) nounwind readnone
define i64 @test_pcmpgtw(x86_mmx %a0, x86_mmx %a1, x86_mmx* %a2) optsize {
; GENERIC-LABEL: test_pcmpgtw:
; GENERIC: # %bb.0:
; GENERIC-NEXT: pcmpgtw %mm1, %mm0 # sched: [3:1.00]
; GENERIC-NEXT: pcmpgtw (%rdi), %mm0 # sched: [8:1.00]
; GENERIC-NEXT: movq %mm0, %rax # sched: [2:1.00]
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_pcmpgtw:
; ATOM: # %bb.0:
; ATOM-NEXT: pcmpgtw %mm1, %mm0 # sched: [1:0.50]
; ATOM-NEXT: pcmpgtw (%rdi), %mm0 # sched: [1:1.00]
; ATOM-NEXT: movq %mm0, %rax # sched: [3:3.00]
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_pcmpgtw:
; SLM: # %bb.0:
; SLM-NEXT: pcmpgtw %mm1, %mm0 # sched: [1:0.50]
; SLM-NEXT: pcmpgtw (%rdi), %mm0 # sched: [4:1.00]
; SLM-NEXT: movq %mm0, %rax # sched: [1:0.50]
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_pcmpgtw:
; SANDY: # %bb.0:
; SANDY-NEXT: pcmpgtw %mm1, %mm0 # sched: [3:1.00]
; SANDY-NEXT: pcmpgtw (%rdi), %mm0 # sched: [8:1.00]
; SANDY-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_pcmpgtw:
; HASWELL: # %bb.0:
; HASWELL-NEXT: pcmpgtw %mm1, %mm0 # sched: [1:0.50]
; HASWELL-NEXT: pcmpgtw (%rdi), %mm0 # sched: [6:0.50]
; HASWELL-NEXT: movq %mm0, %rax # sched: [1:1.00]
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_pcmpgtw:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: pcmpgtw %mm1, %mm0 # sched: [1:0.50]
; BROADWELL-NEXT: pcmpgtw (%rdi), %mm0 # sched: [6:0.50]
; BROADWELL-NEXT: movq %mm0, %rax # sched: [1:1.00]
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_pcmpgtw:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: pcmpgtw %mm1, %mm0 # sched: [1:1.00]
; SKYLAKE-NEXT: pcmpgtw (%rdi), %mm0 # sched: [6:1.00]
; SKYLAKE-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_pcmpgtw:
; SKX: # %bb.0:
; SKX-NEXT: pcmpgtw %mm1, %mm0 # sched: [1:1.00]
; SKX-NEXT: pcmpgtw (%rdi), %mm0 # sched: [6:1.00]
; SKX-NEXT: movq %mm0, %rax # sched: [2:1.00]
; SKX-NEXT: retq # sched: [7:1.00]
;
; BDVER2-LABEL: test_pcmpgtw:
; BDVER2: # %bb.0:
; BDVER2-NEXT: pcmpgtw %mm1, %mm0 # sched: [2:0.50]
; BDVER2-NEXT: pcmpgtw (%rdi), %mm0 # sched: [7:0.50]
; BDVER2-NEXT: movq %mm0, %rax # sched: [10:1.00]
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_pcmpgtw:
; BTVER2: # %bb.0:
; BTVER2-NEXT: pcmpgtw %mm1, %mm0 # sched: [1:0.50]
; BTVER2-NEXT: pcmpgtw (%rdi), %mm0 # sched: [6:1.00]
; BTVER2-NEXT: movq %mm0, %rax # sched: [4:1.00]
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_pcmpgtw:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: pcmpgtw %mm1, %mm0 # sched: [1:0.25]
; ZNVER1-NEXT: pcmpgtw (%rdi), %mm0 # sched: [8:0.50]
; ZNVER1-NEXT: movq %mm0, %rax # sched: [2:1.00]
; ZNVER1-NEXT: retq # sched: [1:0.50]
%1 = call x86_mmx @llvm.x86.mmx.pcmpgt.w(x86_mmx %a0, x86_mmx %a1)
%2 = load x86_mmx, x86_mmx *%a2, align 8
%3 = call x86_mmx @llvm.x86.mmx.pcmpgt.w(x86_mmx %1, x86_mmx %2)
%4 = bitcast x86_mmx %3 to i64
ret i64 %4
}
declare x86_mmx @llvm.x86.mmx.pcmpgt.w(x86_mmx, x86_mmx) nounwind readnone
define i32 @test_pextrw(x86_mmx %a0) optsize {
; GENERIC-LABEL: test_pextrw:
; GENERIC: # %bb.0:
; GENERIC-NEXT: pextrw $0, %mm0, %eax # sched: [3:1.00]
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_pextrw:
; ATOM: # %bb.0:
; ATOM-NEXT: pextrw $0, %mm0, %eax # sched: [4:2.00]
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_pextrw:
; SLM: # %bb.0:
; SLM-NEXT: pextrw $0, %mm0, %eax # sched: [1:1.00]
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_pextrw:
; SANDY: # %bb.0:
; SANDY-NEXT: pextrw $0, %mm0, %eax # sched: [3:1.00]
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_pextrw:
; HASWELL: # %bb.0:
; HASWELL-NEXT: pextrw $0, %mm0, %eax # sched: [2:1.00]
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_pextrw:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: pextrw $0, %mm0, %eax # sched: [2:1.00]
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_pextrw:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: pextrw $0, %mm0, %eax # sched: [3:1.00]
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_pextrw:
; SKX: # %bb.0:
; SKX-NEXT: pextrw $0, %mm0, %eax # sched: [3:1.00]
; SKX-NEXT: retq # sched: [7:1.00]
;
; BDVER2-LABEL: test_pextrw:
; BDVER2: # %bb.0:
; BDVER2-NEXT: pextrw $0, %mm0, %eax # sched: [13:1.00]
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_pextrw:
; BTVER2: # %bb.0:
; BTVER2-NEXT: pextrw $0, %mm0, %eax # sched: [3:1.00]
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_pextrw:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: pextrw $0, %mm0, %eax # sched: [2:2.00]
; ZNVER1-NEXT: retq # sched: [1:0.50]
%1 = call i32 @llvm.x86.mmx.pextr.w(x86_mmx %a0, i32 0)
ret i32 %1
}
declare i32 @llvm.x86.mmx.pextr.w(x86_mmx, i32) nounwind readnone
define i64 @test_phaddd(x86_mmx %a0, x86_mmx %a1, x86_mmx* %a2) optsize {
; GENERIC-LABEL: test_phaddd:
; GENERIC: # %bb.0:
; GENERIC-NEXT: phaddd %mm1, %mm0 # sched: [3:1.50]
; GENERIC-NEXT: phaddd (%rdi), %mm0 # sched: [8:1.50]
; GENERIC-NEXT: movq %mm0, %rax # sched: [2:1.00]
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_phaddd:
; ATOM: # %bb.0:
; ATOM-NEXT: phaddd %mm1, %mm0 # sched: [3:1.50]