[AArch64] add tests for fcvtl2; NFC

This commit is contained in:
Sanjay Patel 2019-12-17 10:21:32 -05:00
parent 2423774cc2
commit fbaf835c5c
1 changed files with 183 additions and 8 deletions

View File

@ -38,19 +38,19 @@ define <2 x double> @test_vcvt_high_f64_f32(<4 x float> %x) nounwind readnone ss
ret <2 x double> %vcvt1.i
}
define <2 x double> @test_vcvt_high_f64_f32_bitcast(<4 x float> %x) nounwind readnone ssp {
; GENERIC-LABEL: test_vcvt_high_f64_f32_bitcast:
define <2 x double> @test_vcvt_high_v1f64_f32_bitcast(<4 x float> %x) nounwind readnone ssp {
; GENERIC-LABEL: test_vcvt_high_v1f64_f32_bitcast:
; GENERIC: // %bb.0:
; GENERIC-NEXT: ext.16b v0, v0, v0, #8
; GENERIC-NEXT: fcvtl v0.2d, v0.2s
; GENERIC-NEXT: ret
;
; FAST-LABEL: test_vcvt_high_f64_f32_bitcast:
; FAST-LABEL: test_vcvt_high_v1f64_f32_bitcast:
; FAST: // %bb.0:
; FAST-NEXT: fcvtl2 v0.2d, v0.4s
; FAST-NEXT: ret
;
; GISEL-LABEL: test_vcvt_high_f64_f32_bitcast:
; GISEL-LABEL: test_vcvt_high_v1f64_f32_bitcast:
; GISEL: // %bb.0:
; GISEL-NEXT: ext.16b v0, v0, v0, #8
; GISEL-NEXT: fcvtl v0.2d, v0.2s
@ -62,21 +62,21 @@ define <2 x double> @test_vcvt_high_f64_f32_bitcast(<4 x float> %x) nounwind rea
ret <2 x double> %r
}
define <2 x double> @test_vcvt_high_i64_f32_bitcast(<2 x i64> %x) nounwind readnone ssp {
; GENERIC-LABEL: test_vcvt_high_i64_f32_bitcast:
define <2 x double> @test_vcvt_high_v1i64_f32_bitcast(<2 x i64> %x) nounwind readnone ssp {
; GENERIC-LABEL: test_vcvt_high_v1i64_f32_bitcast:
; GENERIC: // %bb.0:
; GENERIC-NEXT: ext.16b v0, v0, v0, #8
; GENERIC-NEXT: fcvtl v0.2d, v0.2s
; GENERIC-NEXT: ret
;
; FAST-LABEL: test_vcvt_high_i64_f32_bitcast:
; FAST-LABEL: test_vcvt_high_v1i64_f32_bitcast:
; FAST: // %bb.0:
; FAST-NEXT: ext.16b v0, v0, v0, #8
; FAST-NEXT: // kill: def $d0 killed $d0 killed $q0
; FAST-NEXT: fcvtl v0.2d, v0.2s
; FAST-NEXT: ret
;
; GISEL-LABEL: test_vcvt_high_i64_f32_bitcast:
; GISEL-LABEL: test_vcvt_high_v1i64_f32_bitcast:
; GISEL: // %bb.0:
; GISEL-NEXT: ext.16b v0, v0, v0, #8
; GISEL-NEXT: fcvtl v0.2d, v0.2s
@ -87,6 +87,181 @@ define <2 x double> @test_vcvt_high_i64_f32_bitcast(<2 x i64> %x) nounwind readn
ret <2 x double> %r
}
define <2 x double> @test_vcvt_high_v2i32_f32_bitcast(<4 x i32> %x) nounwind readnone ssp {
; GENERIC-LABEL: test_vcvt_high_v2i32_f32_bitcast:
; GENERIC: // %bb.0:
; GENERIC-NEXT: ext.16b v0, v0, v0, #8
; GENERIC-NEXT: fcvtl v0.2d, v0.2s
; GENERIC-NEXT: ret
;
; FAST-LABEL: test_vcvt_high_v2i32_f32_bitcast:
; FAST: // %bb.0:
; FAST-NEXT: ext.16b v0, v0, v0, #8
; FAST-NEXT: // kill: def $d0 killed $d0 killed $q0
; FAST-NEXT: fcvtl v0.2d, v0.2s
; FAST-NEXT: ret
;
; GISEL-LABEL: test_vcvt_high_v2i32_f32_bitcast:
; GISEL: // %bb.0:
; GISEL-NEXT: ext.16b v0, v0, v0, #8
; GISEL-NEXT: fcvtl v0.2d, v0.2s
; GISEL-NEXT: ret
%ext = shufflevector <4 x i32> %x, <4 x i32> undef, <2 x i32> <i32 2, i32 3>
%bc2 = bitcast <2 x i32> %ext to <2 x float>
%r = fpext <2 x float> %bc2 to <2 x double>
ret <2 x double> %r
}
define <2 x double> @test_vcvt_high_v4i16_f32_bitcast(<8 x i16> %x) nounwind readnone ssp {
; GENERIC-LABEL: test_vcvt_high_v4i16_f32_bitcast:
; GENERIC: // %bb.0:
; GENERIC-NEXT: ext.16b v0, v0, v0, #8
; GENERIC-NEXT: fcvtl v0.2d, v0.2s
; GENERIC-NEXT: ret
;
; FAST-LABEL: test_vcvt_high_v4i16_f32_bitcast:
; FAST: // %bb.0:
; FAST-NEXT: ext.16b v0, v0, v0, #8
; FAST-NEXT: // kill: def $d0 killed $d0 killed $q0
; FAST-NEXT: fcvtl v0.2d, v0.2s
; FAST-NEXT: ret
;
; GISEL-LABEL: test_vcvt_high_v4i16_f32_bitcast:
; GISEL: // %bb.0:
; GISEL-NEXT: ext.16b v0, v0, v0, #8
; GISEL-NEXT: fcvtl v0.2d, v0.2s
; GISEL-NEXT: ret
%ext = shufflevector <8 x i16> %x, <8 x i16> undef, <4 x i32> <i32 4, i32 5, i32 6, i32 7>
%bc2 = bitcast <4 x i16> %ext to <2 x float>
%r = fpext <2 x float> %bc2 to <2 x double>
ret <2 x double> %r
}
define <2 x double> @test_vcvt_high_v8i8_f32_bitcast(<16 x i8> %x) nounwind readnone ssp {
; GENERIC-LABEL: test_vcvt_high_v8i8_f32_bitcast:
; GENERIC: // %bb.0:
; GENERIC-NEXT: ext.16b v0, v0, v0, #8
; GENERIC-NEXT: fcvtl v0.2d, v0.2s
; GENERIC-NEXT: ret
;
; FAST-LABEL: test_vcvt_high_v8i8_f32_bitcast:
; FAST: // %bb.0:
; FAST-NEXT: ext.16b v0, v0, v0, #8
; FAST-NEXT: // kill: def $d0 killed $d0 killed $q0
; FAST-NEXT: fcvtl v0.2d, v0.2s
; FAST-NEXT: ret
;
; GISEL-LABEL: test_vcvt_high_v8i8_f32_bitcast:
; GISEL: // %bb.0:
; GISEL-NEXT: ext.16b v0, v0, v0, #8
; GISEL-NEXT: fcvtl v0.2d, v0.2s
; GISEL-NEXT: ret
%ext = shufflevector <16 x i8> %x, <16 x i8> undef, <8 x i32> <i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>
%bc2 = bitcast <8 x i8> %ext to <2 x float>
%r = fpext <2 x float> %bc2 to <2 x double>
ret <2 x double> %r
}
define <4 x float> @test_vcvt_high_v1i64_f16_bitcast(<2 x i64> %x) nounwind readnone ssp {
; GENERIC-LABEL: test_vcvt_high_v1i64_f16_bitcast:
; GENERIC: // %bb.0:
; GENERIC-NEXT: ext.16b v0, v0, v0, #8
; GENERIC-NEXT: fcvtl v0.4s, v0.4h
; GENERIC-NEXT: ret
;
; FAST-LABEL: test_vcvt_high_v1i64_f16_bitcast:
; FAST: // %bb.0:
; FAST-NEXT: ext.16b v0, v0, v0, #8
; FAST-NEXT: // kill: def $d0 killed $d0 killed $q0
; FAST-NEXT: fcvtl v0.4s, v0.4h
; FAST-NEXT: ret
;
; GISEL-LABEL: test_vcvt_high_v1i64_f16_bitcast:
; GISEL: // %bb.0:
; GISEL-NEXT: ext.16b v0, v0, v0, #8
; GISEL-NEXT: fcvtl v0.4s, v0.4h
; GISEL-NEXT: ret
%ext = shufflevector <2 x i64> %x, <2 x i64> undef, <1 x i32> <i32 1>
%bc2 = bitcast <1 x i64> %ext to <4 x half>
%r = fpext <4 x half> %bc2 to <4 x float>
ret <4 x float> %r
}
define <4 x float> @test_vcvt_high_v2i32_f16_bitcast(<4 x i32> %x) nounwind readnone ssp {
; GENERIC-LABEL: test_vcvt_high_v2i32_f16_bitcast:
; GENERIC: // %bb.0:
; GENERIC-NEXT: ext.16b v0, v0, v0, #8
; GENERIC-NEXT: fcvtl v0.4s, v0.4h
; GENERIC-NEXT: ret
;
; FAST-LABEL: test_vcvt_high_v2i32_f16_bitcast:
; FAST: // %bb.0:
; FAST-NEXT: ext.16b v0, v0, v0, #8
; FAST-NEXT: // kill: def $d0 killed $d0 killed $q0
; FAST-NEXT: fcvtl v0.4s, v0.4h
; FAST-NEXT: ret
;
; GISEL-LABEL: test_vcvt_high_v2i32_f16_bitcast:
; GISEL: // %bb.0:
; GISEL-NEXT: ext.16b v0, v0, v0, #8
; GISEL-NEXT: fcvtl v0.4s, v0.4h
; GISEL-NEXT: ret
%ext = shufflevector <4 x i32> %x, <4 x i32> undef, <2 x i32> <i32 2, i32 3>
%bc2 = bitcast <2 x i32> %ext to <4 x half>
%r = fpext <4 x half> %bc2 to <4 x float>
ret <4 x float> %r
}
define <4 x float> @test_vcvt_high_v4i16_f16_bitcast(<8 x i16> %x) nounwind readnone ssp {
; GENERIC-LABEL: test_vcvt_high_v4i16_f16_bitcast:
; GENERIC: // %bb.0:
; GENERIC-NEXT: ext.16b v0, v0, v0, #8
; GENERIC-NEXT: fcvtl v0.4s, v0.4h
; GENERIC-NEXT: ret
;
; FAST-LABEL: test_vcvt_high_v4i16_f16_bitcast:
; FAST: // %bb.0:
; FAST-NEXT: ext.16b v0, v0, v0, #8
; FAST-NEXT: // kill: def $d0 killed $d0 killed $q0
; FAST-NEXT: fcvtl v0.4s, v0.4h
; FAST-NEXT: ret
;
; GISEL-LABEL: test_vcvt_high_v4i16_f16_bitcast:
; GISEL: // %bb.0:
; GISEL-NEXT: ext.16b v0, v0, v0, #8
; GISEL-NEXT: fcvtl v0.4s, v0.4h
; GISEL-NEXT: ret
%ext = shufflevector <8 x i16> %x, <8 x i16> undef, <4 x i32> <i32 4, i32 5, i32 6, i32 7>
%bc2 = bitcast <4 x i16> %ext to <4 x half>
%r = fpext <4 x half> %bc2 to <4 x float>
ret <4 x float> %r
}
define <4 x float> @test_vcvt_high_v8i8_f16_bitcast(<16 x i8> %x) nounwind readnone ssp {
; GENERIC-LABEL: test_vcvt_high_v8i8_f16_bitcast:
; GENERIC: // %bb.0:
; GENERIC-NEXT: ext.16b v0, v0, v0, #8
; GENERIC-NEXT: fcvtl v0.4s, v0.4h
; GENERIC-NEXT: ret
;
; FAST-LABEL: test_vcvt_high_v8i8_f16_bitcast:
; FAST: // %bb.0:
; FAST-NEXT: ext.16b v0, v0, v0, #8
; FAST-NEXT: // kill: def $d0 killed $d0 killed $q0
; FAST-NEXT: fcvtl v0.4s, v0.4h
; FAST-NEXT: ret
;
; GISEL-LABEL: test_vcvt_high_v8i8_f16_bitcast:
; GISEL: // %bb.0:
; GISEL-NEXT: ext.16b v0, v0, v0, #8
; GISEL-NEXT: fcvtl v0.4s, v0.4h
; GISEL-NEXT: ret
%ext = shufflevector <16 x i8> %x, <16 x i8> undef, <8 x i32> <i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>
%bc2 = bitcast <8 x i8> %ext to <4 x half>
%r = fpext <4 x half> %bc2 to <4 x float>
ret <4 x float> %r
}
; FALLBACK-NOT: remark{{.*}}G_FPEXT{{.*}}(in function: test_vcvt_f32_f64)
; FALLBACK-NOT: remark{{.*}}fpext{{.*}}(in function: test_vcvt_f32_f64)
define <2 x float> @test_vcvt_f32_f64(<2 x double> %v) nounwind readnone ssp {