mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-02 07:11:49 +00:00
use update_llc_test_checks.py to tighten checking; remove unnecessary testing params
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234027 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9dcb78c676
commit
c070a8f6ba
@ -1,84 +1,122 @@
|
||||
; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7-avx -mattr=+avx | FileCheck %s
|
||||
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx | FileCheck %s
|
||||
|
||||
; CHECK: vcvtdq2ps %ymm
|
||||
define <8 x float> @sitofp00(<8 x i32> %a) nounwind {
|
||||
; CHECK-LABEL: sitofp00:
|
||||
; CHECK: # BB#0:
|
||||
; CHECK-NEXT: vcvtdq2ps %ymm0, %ymm0
|
||||
; CHECK-NEXT: retq
|
||||
%b = sitofp <8 x i32> %a to <8 x float>
|
||||
ret <8 x float> %b
|
||||
}
|
||||
|
||||
; CHECK: vcvttps2dq %ymm
|
||||
define <8 x i32> @fptosi00(<8 x float> %a) nounwind {
|
||||
; CHECK-LABEL: fptosi00:
|
||||
; CHECK: # BB#0:
|
||||
; CHECK-NEXT: vcvttps2dq %ymm0, %ymm0
|
||||
; CHECK-NEXT: retq
|
||||
%b = fptosi <8 x float> %a to <8 x i32>
|
||||
ret <8 x i32> %b
|
||||
}
|
||||
|
||||
; CHECK: vcvtdq2pd %xmm
|
||||
define <4 x double> @sitofp01(<4 x i32> %a) {
|
||||
; CHECK-LABEL: sitofp01:
|
||||
; CHECK: # BB#0:
|
||||
; CHECK-NEXT: vcvtdq2pd %xmm0, %ymm0
|
||||
; CHECK-NEXT: retq
|
||||
%b = sitofp <4 x i32> %a to <4 x double>
|
||||
ret <4 x double> %b
|
||||
}
|
||||
|
||||
; CHECK: vcvtdq2ps %ymm
|
||||
define <8 x float> @sitofp02(<8 x i16> %a) {
|
||||
; CHECK-LABEL: sitofp02:
|
||||
; CHECK: # BB#0:
|
||||
; CHECK-NEXT: vpmovsxwd %xmm0, %xmm1
|
||||
; CHECK-NEXT: vpshufd {{.*#+}} xmm0 = xmm0[2,3,0,1]
|
||||
; CHECK-NEXT: vpmovsxwd %xmm0, %xmm0
|
||||
; CHECK-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
|
||||
; CHECK-NEXT: vcvtdq2ps %ymm0, %ymm0
|
||||
; CHECK-NEXT: retq
|
||||
%b = sitofp <8 x i16> %a to <8 x float>
|
||||
ret <8 x float> %b
|
||||
}
|
||||
|
||||
; CHECK: vcvttpd2dqy %ymm
|
||||
define <4 x i32> @fptosi01(<4 x double> %a) {
|
||||
; CHECK-LABEL: fptosi01:
|
||||
; CHECK: # BB#0:
|
||||
; CHECK-NEXT: vcvttpd2dqy %ymm0, %xmm0
|
||||
; CHECK-NEXT: vzeroupper
|
||||
; CHECK-NEXT: retq
|
||||
%b = fptosi <4 x double> %a to <4 x i32>
|
||||
ret <4 x i32> %b
|
||||
}
|
||||
|
||||
; CHECK: vcvtpd2psy %ymm
|
||||
; CHECK-NEXT: vcvtpd2psy %ymm
|
||||
; CHECK-NEXT: vinsertf128 $1
|
||||
define <8 x float> @fptrunc00(<8 x double> %b) nounwind {
|
||||
; CHECK-LABEL: fptrunc00:
|
||||
; CHECK: # BB#0:
|
||||
; CHECK-NEXT: vcvtpd2psy %ymm0, %xmm0
|
||||
; CHECK-NEXT: vcvtpd2psy %ymm1, %xmm1
|
||||
; CHECK-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
|
||||
; CHECK-NEXT: retq
|
||||
%a = fptrunc <8 x double> %b to <8 x float>
|
||||
ret <8 x float> %a
|
||||
}
|
||||
|
||||
; CHECK: vcvtps2pd %xmm
|
||||
define <4 x double> @fpext00(<4 x float> %b) nounwind {
|
||||
; CHECK-LABEL: fpext00:
|
||||
; CHECK: # BB#0:
|
||||
; CHECK-NEXT: vcvtps2pd %xmm0, %ymm0
|
||||
; CHECK-NEXT: retq
|
||||
%a = fpext <4 x float> %b to <4 x double>
|
||||
ret <4 x double> %a
|
||||
}
|
||||
|
||||
; CHECK: vcvtsi2sdq (%
|
||||
define double @funcA(i64* nocapture %e) nounwind uwtable readonly ssp {
|
||||
entry:
|
||||
; CHECK-LABEL: funcA:
|
||||
; CHECK: # BB#0:
|
||||
; CHECK-NEXT: vcvtsi2sdq (%rdi), %xmm0, %xmm0
|
||||
; CHECK-NEXT: retq
|
||||
%tmp1 = load i64, i64* %e, align 8
|
||||
%conv = sitofp i64 %tmp1 to double
|
||||
ret double %conv
|
||||
}
|
||||
|
||||
; CHECK: vcvtsi2sdl (%
|
||||
define double @funcB(i32* nocapture %e) nounwind uwtable readonly ssp {
|
||||
entry:
|
||||
; CHECK-LABEL: funcB:
|
||||
; CHECK: # BB#0:
|
||||
; CHECK-NEXT: vcvtsi2sdl (%rdi), %xmm0, %xmm0
|
||||
; CHECK-NEXT: retq
|
||||
%tmp1 = load i32, i32* %e, align 4
|
||||
%conv = sitofp i32 %tmp1 to double
|
||||
ret double %conv
|
||||
}
|
||||
|
||||
; CHECK: vcvtsi2ssl (%
|
||||
define float @funcC(i32* nocapture %e) nounwind uwtable readonly ssp {
|
||||
entry:
|
||||
; CHECK-LABEL: funcC:
|
||||
; CHECK: # BB#0:
|
||||
; CHECK-NEXT: vcvtsi2ssl (%rdi), %xmm0, %xmm0
|
||||
; CHECK-NEXT: retq
|
||||
%tmp1 = load i32, i32* %e, align 4
|
||||
%conv = sitofp i32 %tmp1 to float
|
||||
ret float %conv
|
||||
}
|
||||
|
||||
; CHECK: vcvtsi2ssq (%
|
||||
define float @funcD(i64* nocapture %e) nounwind uwtable readonly ssp {
|
||||
entry:
|
||||
; CHECK-LABEL: funcD:
|
||||
; CHECK: # BB#0:
|
||||
; CHECK-NEXT: vcvtsi2ssq (%rdi), %xmm0, %xmm0
|
||||
; CHECK-NEXT: retq
|
||||
%tmp1 = load i64, i64* %e, align 8
|
||||
%conv = sitofp i64 %tmp1 to float
|
||||
ret float %conv
|
||||
}
|
||||
|
||||
; CHECK: vcvtss2sd
|
||||
define void @fpext() nounwind uwtable {
|
||||
entry:
|
||||
; CHECK-LABEL: fpext:
|
||||
; CHECK: # BB#0:
|
||||
; CHECK-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
|
||||
; CHECK-NEXT: vcvtss2sd %xmm0, %xmm0, %xmm0
|
||||
; CHECK-NEXT: vmovsd %xmm0, -{{[0-9]+}}(%rsp)
|
||||
; CHECK-NEXT: retq
|
||||
%f = alloca float, align 4
|
||||
%d = alloca double, align 8
|
||||
%tmp = load float, float* %f, align 4
|
||||
@ -88,16 +126,20 @@ entry:
|
||||
}
|
||||
|
||||
define double @nearbyint_f64(double %a) {
|
||||
; CHECK-LABEL: nearbyint_f64
|
||||
; CHECK: vroundsd $12
|
||||
; CHECK-LABEL: nearbyint_f64:
|
||||
; CHECK: # BB#0:
|
||||
; CHECK-NEXT: vroundsd $12, %xmm0, %xmm0, %xmm0
|
||||
; CHECK-NEXT: retq
|
||||
%res = call double @llvm.nearbyint.f64(double %a)
|
||||
ret double %res
|
||||
}
|
||||
declare double @llvm.nearbyint.f64(double %p)
|
||||
|
||||
define float @floor_f32(float %a) {
|
||||
; CHECK-LABEL: floor_f32
|
||||
; CHECK: vroundss $1
|
||||
; CHECK-LABEL: floor_f32:
|
||||
; CHECK: # BB#0:
|
||||
; CHECK-NEXT: vroundss $1, %xmm0, %xmm0, %xmm0
|
||||
; CHECK-NEXT: retq
|
||||
%res = call float @llvm.floor.f32(float %a)
|
||||
ret float %res
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user