This repository was archived by the owner on Feb 5, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed
Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -8304,6 +8304,12 @@ let Predicates = [HasF16C] in {
83048304 defm VCVTPH2PSY : f16c_ph2ps<VR256, f128mem, int_x86_vcvtph2ps_256>, VEX_L;
83058305 defm VCVTPS2PH : f16c_ps2ph<VR128, f64mem, int_x86_vcvtps2ph_128>;
83068306 defm VCVTPS2PHY : f16c_ps2ph<VR256, f128mem, int_x86_vcvtps2ph_256>, VEX_L;
8307+
8308+ // Pattern match vcvtph2ps of a scalar i64 load.
8309+ def : Pat<(int_x86_vcvtph2ps_128 (vzmovl_v2i64 addr:$src)),
8310+ (VCVTPH2PSrm addr:$src)>;
8311+ def : Pat<(int_x86_vcvtph2ps_128 (vzload_v2i64 addr:$src)),
8312+ (VCVTPH2PSrm addr:$src)>;
83078313}
83088314
83098315//===----------------------------------------------------------------------===//
Original file line number Diff line number Diff line change 11; RUN: llc < %s -march=x86 -mattr=+avx,+f16c | FileCheck %s
2+ ; RUN: llc < %s -march=x86-64 -mattr=+avx,+f16c | FileCheck %s
23
34define <4 x float > @test_x86_vcvtph2ps_128 (<8 x i16 > %a0 ) {
45 ; CHECK: vcvtph2ps
@@ -30,3 +31,16 @@ define <8 x i16> @test_x86_vcvtps2ph_256(<8 x float> %a0) {
3031 ret <8 x i16 > %res
3132}
3233declare <8 x i16 > @llvm.x86.vcvtps2ph.256 (<8 x float >, i32 ) nounwind readonly
34+
35+ define <4 x float > @test_x86_vcvtps2ph_128_scalar (i64* %ptr ) {
36+ ; CHECK-LABEL: test_x86_vcvtps2ph_128_scalar
37+ ; CHECK-NOT: vmov
38+ ; CHECK: vcvtph2ps (%
39+
40+ %load = load i64* %ptr
41+ %ins1 = insertelement <2 x i64 > undef , i64 %load , i32 0
42+ %ins2 = insertelement <2 x i64 > %ins1 , i64 0 , i32 1
43+ %bc = bitcast <2 x i64 > %ins2 to <8 x i16 >
44+ %res = tail call <4 x float > @llvm.x86.vcvtph2ps.128 (<8 x i16 > %bc ) #2
45+ ret <4 x float > %res
46+ }
You can’t perform that action at this time.
0 commit comments