2019-10-31 02:41:44 +08:00
|
|
|
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
2019-12-06 09:44:33 +08:00
|
|
|
; RUN: llc < %s -mtriple=i686-unknown-unknown -mattr=+sse2 -O3 -disable-strictnode-mutation | FileCheck %s --check-prefixes=CHECK,SSE
|
|
|
|
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+sse2 -O3 -disable-strictnode-mutation | FileCheck %s --check-prefixes=CHECK,SSE
|
|
|
|
; RUN: llc < %s -mtriple=i686-unknown-unknown -mattr=+avx -O3 -disable-strictnode-mutation | FileCheck %s --check-prefixes=CHECK,AVX
|
|
|
|
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx -O3 -disable-strictnode-mutation | FileCheck %s --check-prefixes=CHECK,AVX
|
|
|
|
; RUN: llc < %s -mtriple=i686-unknown-unknown -mattr=+avx512f -mattr=+avx512vl -O3 -disable-strictnode-mutation | FileCheck %s --check-prefixes=CHECK,AVX
|
|
|
|
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512f -mattr=+avx512vl -O3 -disable-strictnode-mutation | FileCheck %s --check-prefixes=CHECK,AVX
|
2019-10-31 02:41:44 +08:00
|
|
|
|
|
|
|
declare <2 x double> @llvm.experimental.constrained.fadd.v2f64(<2 x double>, <2 x double>, metadata, metadata)
|
|
|
|
declare <4 x float> @llvm.experimental.constrained.fadd.v4f32(<4 x float>, <4 x float>, metadata, metadata)
|
|
|
|
declare <2 x double> @llvm.experimental.constrained.fsub.v2f64(<2 x double>, <2 x double>, metadata, metadata)
|
|
|
|
declare <4 x float> @llvm.experimental.constrained.fsub.v4f32(<4 x float>, <4 x float>, metadata, metadata)
|
|
|
|
declare <2 x double> @llvm.experimental.constrained.fmul.v2f64(<2 x double>, <2 x double>, metadata, metadata)
|
|
|
|
declare <4 x float> @llvm.experimental.constrained.fmul.v4f32(<4 x float>, <4 x float>, metadata, metadata)
|
|
|
|
declare <2 x double> @llvm.experimental.constrained.fdiv.v2f64(<2 x double>, <2 x double>, metadata, metadata)
|
|
|
|
declare <4 x float> @llvm.experimental.constrained.fdiv.v4f32(<4 x float>, <4 x float>, metadata, metadata)
|
|
|
|
|
|
|
|
define <2 x double> @f1(<2 x double> %a, <2 x double> %b) #0 {
|
|
|
|
; SSE-LABEL: f1:
|
|
|
|
; SSE: # %bb.0:
|
2019-11-22 06:24:32 +08:00
|
|
|
; SSE-NEXT: addpd %xmm1, %xmm0
|
2019-10-31 02:41:44 +08:00
|
|
|
; SSE-NEXT: ret{{[l|q]}}
|
|
|
|
;
|
|
|
|
; AVX-LABEL: f1:
|
|
|
|
; AVX: # %bb.0:
|
2019-11-22 06:24:32 +08:00
|
|
|
; AVX-NEXT: vaddpd %xmm1, %xmm0, %xmm0
|
2019-10-31 02:41:44 +08:00
|
|
|
; AVX-NEXT: ret{{[l|q]}}
|
|
|
|
%ret = call <2 x double> @llvm.experimental.constrained.fadd.v2f64(<2 x double> %a, <2 x double> %b,
|
|
|
|
metadata !"round.dynamic",
|
|
|
|
metadata !"fpexcept.strict") #0
|
|
|
|
ret <2 x double> %ret
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x float> @f2(<4 x float> %a, <4 x float> %b) #0 {
|
|
|
|
; SSE-LABEL: f2:
|
|
|
|
; SSE: # %bb.0:
|
2019-11-22 06:24:32 +08:00
|
|
|
; SSE-NEXT: addps %xmm1, %xmm0
|
2019-10-31 02:41:44 +08:00
|
|
|
; SSE-NEXT: ret{{[l|q]}}
|
|
|
|
;
|
|
|
|
; AVX-LABEL: f2:
|
|
|
|
; AVX: # %bb.0:
|
2019-11-22 06:24:32 +08:00
|
|
|
; AVX-NEXT: vaddps %xmm1, %xmm0, %xmm0
|
2019-10-31 02:41:44 +08:00
|
|
|
; AVX-NEXT: ret{{[l|q]}}
|
|
|
|
%ret = call <4 x float> @llvm.experimental.constrained.fadd.v4f32(<4 x float> %a, <4 x float> %b,
|
|
|
|
metadata !"round.dynamic",
|
|
|
|
metadata !"fpexcept.strict") #0
|
|
|
|
ret <4 x float> %ret
|
|
|
|
}
|
|
|
|
|
|
|
|
define <2 x double> @f3(<2 x double> %a, <2 x double> %b) #0 {
|
|
|
|
; SSE-LABEL: f3:
|
|
|
|
; SSE: # %bb.0:
|
2019-11-22 06:24:32 +08:00
|
|
|
; SSE-NEXT: subpd %xmm1, %xmm0
|
2019-10-31 02:41:44 +08:00
|
|
|
; SSE-NEXT: ret{{[l|q]}}
|
|
|
|
;
|
|
|
|
; AVX-LABEL: f3:
|
|
|
|
; AVX: # %bb.0:
|
2019-11-22 06:24:32 +08:00
|
|
|
; AVX-NEXT: vsubpd %xmm1, %xmm0, %xmm0
|
2019-10-31 02:41:44 +08:00
|
|
|
; AVX-NEXT: ret{{[l|q]}}
|
|
|
|
%ret = call <2 x double> @llvm.experimental.constrained.fsub.v2f64(<2 x double> %a, <2 x double> %b,
|
|
|
|
metadata !"round.dynamic",
|
|
|
|
metadata !"fpexcept.strict") #0
|
|
|
|
ret <2 x double> %ret
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x float> @f4(<4 x float> %a, <4 x float> %b) #0 {
|
|
|
|
; SSE-LABEL: f4:
|
|
|
|
; SSE: # %bb.0:
|
2019-11-22 06:24:32 +08:00
|
|
|
; SSE-NEXT: subps %xmm1, %xmm0
|
2019-10-31 02:41:44 +08:00
|
|
|
; SSE-NEXT: ret{{[l|q]}}
|
|
|
|
;
|
|
|
|
; AVX-LABEL: f4:
|
|
|
|
; AVX: # %bb.0:
|
2019-11-22 06:24:32 +08:00
|
|
|
; AVX-NEXT: vsubps %xmm1, %xmm0, %xmm0
|
2019-10-31 02:41:44 +08:00
|
|
|
; AVX-NEXT: ret{{[l|q]}}
|
|
|
|
%ret = call <4 x float> @llvm.experimental.constrained.fsub.v4f32(<4 x float> %a, <4 x float> %b,
|
|
|
|
metadata !"round.dynamic",
|
|
|
|
metadata !"fpexcept.strict") #0
|
|
|
|
ret <4 x float> %ret
|
|
|
|
}
|
|
|
|
|
|
|
|
define <2 x double> @f5(<2 x double> %a, <2 x double> %b) #0 {
|
|
|
|
; SSE-LABEL: f5:
|
|
|
|
; SSE: # %bb.0:
|
|
|
|
; SSE-NEXT: mulpd %xmm1, %xmm0
|
|
|
|
; SSE-NEXT: ret{{[l|q]}}
|
|
|
|
;
|
|
|
|
; AVX-LABEL: f5:
|
|
|
|
; AVX: # %bb.0:
|
|
|
|
; AVX-NEXT: vmulpd %xmm1, %xmm0, %xmm0
|
|
|
|
; AVX-NEXT: ret{{[l|q]}}
|
|
|
|
%ret = call <2 x double> @llvm.experimental.constrained.fmul.v2f64(<2 x double> %a, <2 x double> %b,
|
|
|
|
metadata !"round.dynamic",
|
|
|
|
metadata !"fpexcept.strict") #0
|
|
|
|
ret <2 x double> %ret
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x float> @f6(<4 x float> %a, <4 x float> %b) #0 {
|
|
|
|
; SSE-LABEL: f6:
|
|
|
|
; SSE: # %bb.0:
|
|
|
|
; SSE-NEXT: mulps %xmm1, %xmm0
|
|
|
|
; SSE-NEXT: ret{{[l|q]}}
|
|
|
|
;
|
|
|
|
; AVX-LABEL: f6:
|
|
|
|
; AVX: # %bb.0:
|
|
|
|
; AVX-NEXT: vmulps %xmm1, %xmm0, %xmm0
|
|
|
|
; AVX-NEXT: ret{{[l|q]}}
|
|
|
|
%ret = call <4 x float> @llvm.experimental.constrained.fmul.v4f32(<4 x float> %a, <4 x float> %b,
|
|
|
|
metadata !"round.dynamic",
|
|
|
|
metadata !"fpexcept.strict") #0
|
|
|
|
ret <4 x float> %ret
|
|
|
|
}
|
|
|
|
|
|
|
|
define <2 x double> @f7(<2 x double> %a, <2 x double> %b) #0 {
|
|
|
|
; SSE-LABEL: f7:
|
|
|
|
; SSE: # %bb.0:
|
|
|
|
; SSE-NEXT: divpd %xmm1, %xmm0
|
|
|
|
; SSE-NEXT: ret{{[l|q]}}
|
|
|
|
;
|
|
|
|
; AVX-LABEL: f7:
|
|
|
|
; AVX: # %bb.0:
|
|
|
|
; AVX-NEXT: vdivpd %xmm1, %xmm0, %xmm0
|
|
|
|
; AVX-NEXT: ret{{[l|q]}}
|
|
|
|
%ret = call <2 x double> @llvm.experimental.constrained.fdiv.v2f64(<2 x double> %a, <2 x double> %b,
|
|
|
|
metadata !"round.dynamic",
|
|
|
|
metadata !"fpexcept.strict") #0
|
|
|
|
ret <2 x double> %ret
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x float> @f8(<4 x float> %a, <4 x float> %b) #0 {
|
|
|
|
; SSE-LABEL: f8:
|
|
|
|
; SSE: # %bb.0:
|
|
|
|
; SSE-NEXT: divps %xmm1, %xmm0
|
|
|
|
; SSE-NEXT: ret{{[l|q]}}
|
|
|
|
;
|
|
|
|
; AVX-LABEL: f8:
|
|
|
|
; AVX: # %bb.0:
|
|
|
|
; AVX-NEXT: vdivps %xmm1, %xmm0, %xmm0
|
|
|
|
; AVX-NEXT: ret{{[l|q]}}
|
|
|
|
%ret = call <4 x float> @llvm.experimental.constrained.fdiv.v4f32(<4 x float> %a, <4 x float> %b,
|
|
|
|
metadata !"round.dynamic",
|
|
|
|
metadata !"fpexcept.strict") #0
|
|
|
|
ret <4 x float> %ret
|
|
|
|
}
|
|
|
|
|
|
|
|
attributes #0 = { strictfp }
|