Skip to content

Commit 1f24206

Browse files
weiyu-chenigcbot
authored andcommitted
Allow float to packed half-float move on select platforms, second try.
1 parent 718803b commit 1f24206

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

visa/HWCaps.inc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -699,4 +699,9 @@
699699
{
700700
return false;
701701
}
702-
// end HW capabilities
702+
703+
bool hasFtoPackedHFMove() const
704+
{
705+
return false;
706+
}
707+
// end HW capabilities

visa/HWConformity.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1674,8 +1674,10 @@ bool HWConformity::fixDstAlignment(INST_LIST_ITER i, G4_BB* bb, G4_Type extype,
16741674
{
16751675
intHFConversion = true;
16761676
}
1677-
// we allow packed destination for F to HF.
1678-
if (builder.getPlatform() >= GENX_CHV && !intHFConversion && inst->isMixedMode())
1677+
// F to packed HF operations are handled specially later
1678+
bool FtoHFMov = dst->getType() == Type_HF && src0->getType() == Type_F;
1679+
if (builder.getPlatform() >= GENX_CHV && !intHFConversion &&
1680+
(inst->isMixedMode() || (builder.hasFtoPackedHFMove() && FtoHFMov && inst->getExecSize() >= builder.getNativeExecSize())))
16791681
{
16801682
return insertMOV;
16811683
}

0 commit comments

Comments
 (0)