@@ -560,79 +560,28 @@ namespace IGC
560
560
flagDst = true ;
561
561
}
562
562
563
- unsigned numParts = 0 ;
563
+ VISA_VectorOpnd* opnd0 = GetSourceOperand (src0, m_encoderState.m_srcOperand [0 ]);
564
+ VISA_VectorOpnd* opnd1 = GetSourceOperand (src1, m_encoderState.m_srcOperand [1 ]);
564
565
565
- // Due to a simulator quirk, we need to split the instruction even if the
566
- // dst operand of the compare is null, if it "looks" too large,
567
- // that is, if the execution size is 16 and the comparison type
568
- // is QW.
569
- bool bNeedSplitting = false ;
570
- if (flagDst && needsSplitting (GetAluExecSize (dst)) &&
571
- (src0->GetElemSize () > 4 || src1->GetElemSize () > 4 ))
566
+ if (flagDst)
572
567
{
573
- bNeedSplitting = true ;
574
- numParts = 2 ;
568
+ V (vKernel->AppendVISAComparisonInst (
569
+ subOp,
570
+ GetAluEMask (dst),
571
+ GetAluExecSize (dst),
572
+ dst->visaPredVariable ,
573
+ opnd0,
574
+ opnd1));
575
575
}
576
-
577
- bNeedSplitting = bNeedSplitting ||
578
- NeedSplitting (src0, m_encoderState.m_srcOperand [0 ], numParts, true ) ||
579
- NeedSplitting (src1, m_encoderState.m_srcOperand [1 ], numParts, true );
580
-
581
- if (bNeedSplitting)
576
+ else
582
577
{
583
- VISA_EMask_Ctrl execMask = GetAluEMask (dst);
584
- VISA_Exec_Size fromExecSize = GetAluExecSize (dst);
585
- VISA_Exec_Size toExecSize = SplitExecSize (fromExecSize, numParts);
586
-
587
- for (unsigned thePart = 0 ; thePart != numParts; ++thePart) {
588
- SModifier newSrc0Mod = SplitVariable (fromExecSize, toExecSize, thePart, src0, m_encoderState.m_srcOperand [0 ], true );
589
- SModifier newSrc1Mod = SplitVariable (fromExecSize, toExecSize, thePart, src1, m_encoderState.m_srcOperand [1 ], true );
590
- VISA_VectorOpnd* srcOpnd0 = GetSourceOperand (src0, newSrc0Mod);
591
- VISA_VectorOpnd* srcOpnd1 = GetSourceOperand (src1, newSrc1Mod);
592
- if (flagDst)
593
- {
594
- V (vKernel->AppendVISAComparisonInst (subOp,
595
- SplitEMask (fromExecSize, toExecSize, thePart, execMask),
596
- toExecSize,
597
- dst->visaPredVariable ,
598
- srcOpnd0, srcOpnd1));
599
- }
600
- else
601
- {
602
- SModifier newDstMod = SplitVariable (fromExecSize, toExecSize, thePart, dst, m_encoderState.m_dstOperand );
603
- VISA_VectorOpnd* dstOpnd = GetDestinationOperand (dst, newDstMod);
604
- V (vKernel->AppendVISAComparisonInst (subOp,
605
- SplitEMask (fromExecSize, toExecSize, thePart, execMask),
606
- toExecSize,
607
- dstOpnd,
608
- srcOpnd0, srcOpnd1));
609
- }
610
- }
611
- }
612
- else {
613
- VISA_VectorOpnd* opnd0 = GetSourceOperand (src0, m_encoderState.m_srcOperand [0 ]);
614
- VISA_VectorOpnd* opnd1 = GetSourceOperand (src1, m_encoderState.m_srcOperand [1 ]);
615
-
616
- if (flagDst)
617
- {
618
- V (vKernel->AppendVISAComparisonInst (
619
- subOp,
620
- GetAluEMask (dst),
621
- GetAluExecSize (dst),
622
- dst->visaPredVariable ,
623
- opnd0,
624
- opnd1));
625
- }
626
- else
627
- {
628
- V (vKernel->AppendVISAComparisonInst (
629
- subOp,
630
- GetAluEMask (dst),
631
- GetAluExecSize (dst),
632
- GetDestinationOperand (dst, m_encoderState.m_dstOperand ),
633
- opnd0,
634
- opnd1));
635
- }
578
+ V (vKernel->AppendVISAComparisonInst (
579
+ subOp,
580
+ GetAluEMask (dst),
581
+ GetAluExecSize (dst),
582
+ GetDestinationOperand (dst, m_encoderState.m_dstOperand ),
583
+ opnd0,
584
+ opnd1));
636
585
}
637
586
}
638
587
0 commit comments