Skip to content

Commit bc165be

Browse files
jfuentesigcbot
authored andcommitted
Remove split of arithmetic insts in CISACodeGen.
Inst split is handled by vISA.
1 parent d2f93b4 commit bc165be

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

visa/BuildIR.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
3636

3737
#include "Gen4_IR.hpp"
3838
#include "FlowGraph.h"
39+
#include "InstSplit.h"
3940
#include "visa_igc_common_header.h"
4041
#include "Common_ISA.h"
4142
#include "Common_ISA_util.h"

visa/FlowGraph.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -952,6 +952,7 @@ void FlowGraph::normalizeRegionDescriptors()
952952
// materialize the values in global Imm at entry BB
953953
void IR_Builder::materializeGlobalImm(G4_BB* entryBB)
954954
{
955+
InstSplitPass instSplitter(this);
955956
for (int i = 0, numImm = immPool.size(); i < numImm; ++i)
956957
{
957958
auto&& immVal = immPool.getImmVal(i);
@@ -961,7 +962,8 @@ void IR_Builder::materializeGlobalImm(G4_BB* entryBB)
961962
Create_Dst_Opnd_From_Dcl(dcl, 1), immVal.imm, InstOpt_WriteEnable, false);
962963
auto iter = std::find_if(entryBB->begin(), entryBB->end(),
963964
[](G4_INST* inst) { return !inst->isLabel(); });
964-
entryBB->insertBefore(iter, inst);
965+
INST_LIST_ITER newMov = entryBB->insertBefore(iter, inst);
966+
instSplitter.splitInstruction(newMov, entryBB->getInstList());
965967
}
966968
}
967969

visa/IsaVerification.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -554,10 +554,11 @@ void vISAVerifier::verifyRegion(
554554

555555
// Check if the operand may touch more than 2 GRFs due to bad alignment
556556
// So far vISA is able to handle the splitting of:
557-
// moves, logic and cmp instructions
557+
// moves, logic, cmp and arithmetic instructions
558558
if (ISA_Inst_Table[opcode].type != ISA_Inst_Mov &&
559559
ISA_Inst_Table[opcode].type != ISA_Inst_Logic &&
560-
ISA_Inst_Table[opcode].type != ISA_Inst_Compare)
560+
ISA_Inst_Table[opcode].type != ISA_Inst_Compare &&
561+
ISA_Inst_Table[opcode].type != ISA_Inst_Arith)
561562
{
562563
REPORT_INSTRUCTION(options, (COMMON_ISA_GRF_REG_SIZE * 2u) > last_region_elt_byte,
563564
"CISA operand region access out of 2 GRF boundary (within %d bytes): %d",

0 commit comments

Comments
 (0)