Skip to content

Commit f8df103

Browse files
weiyu-chenigcbot
authored andcommitted
Allow float to packed half-float move on select platforms.
1 parent 02e2f5b commit f8df103

File tree

2 files changed

+7
-14
lines changed

2 files changed

+7
-14
lines changed

visa/HWCaps.inc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -683,5 +683,9 @@
683683
bool hasA0WARHWissue()
684684
{
685685
return false;
686+
}
687+
bool hasFtoPackedHFMove() const
688+
{
689+
return false;
686690
}
687691
// end HW capabilities

visa/HWConformity.cpp

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1638,18 +1638,6 @@ bool HWConformity::fixDstAlignment(INST_LIST_ITER i, G4_BB* bb, G4_Type extype,
16381638
) ||
16391639
dstNotAlignedToExecType)
16401640
{
1641-
/*
1642-
* 10.3
1643-
* For byte dst type:
1644-
* 1. no 1 horstride
1645-
* 2. no odd start subreg
1646-
* There is only one excpetion - raw mov op
1647-
* Raw means src operand has no attribute.
1648-
*
1649-
* Note: Actually all these cases are now controlled
1650-
* by extypesize value.
1651-
*/
1652-
16531641
if (inst->isRawMov() &&
16541642
(dst_byte_offset % extypesize == 0 ||
16551643
(byteDst && dst_byte_offset % extypesize == 1)))
@@ -1674,8 +1662,9 @@ bool HWConformity::fixDstAlignment(INST_LIST_ITER i, G4_BB* bb, G4_Type extype,
16741662
{
16751663
intHFConversion = true;
16761664
}
1677-
// we allow packed destination for F to HF.
1678-
if (builder.getPlatform() >= GENX_CHV && !intHFConversion && inst->isMixedMode())
1665+
// F to packed HF operations are handled specially later
1666+
bool FtoHFMov = dst->getType() == Type_HF && src0->getType() == Type_F;
1667+
if (builder.getPlatform() >= GENX_CHV && !intHFConversion && (inst->isMixedMode() || (builder.hasFtoPackedHFMove() && FtoHFMov)))
16791668
{
16801669
return insertMOV;
16811670
}

0 commit comments

Comments
 (0)