Skip to content

Commit 33bf3d0

Browse files
committed
[Autobackout][FuncReg]Revert of change: edca619
Fix IGC crash in case of i1 vector Change-Id: I23e553cd3a793fa99f061ac4e477365ac32affce
1 parent edca619 commit 33bf3d0

File tree

2 files changed

+2
-24
lines changed

2 files changed

+2
-24
lines changed

IGC/Compiler/CISACodeGen/EmitVISAPass.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9672,9 +9672,6 @@ void EmitPass::emitStore3DInner(Value* pllValToStore, Value* pllDstPtr, Value* p
96729672
ResourceDescriptor resource = GetResourceVariable(pllDstPtr);
96739673

96749674
uint sizeInBits = pllValToStore->getType()->getPrimitiveSizeInBits();
9675-
if (0 == sizeInBits && pllValToStore->getType()->isPointerTy()){
9676-
sizeInBits = m_currShader->GetContext()->getRegisterPointerSizeInBits(pllValToStore->getType()->getPointerAddressSpace());
9677-
}
96789675

96799676
assert((sizeInBits == 8 ||
96809677
sizeInBits == 16 ||

IGC/Compiler/ThreadCombining.cpp

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -316,27 +316,8 @@ void ThreadCombining::FindRegistersAliveAcrossBarriers(llvm::Function* m_kernel,
316316
}
317317
if (!canMoveInstructionToEntryBlock)
318318
{
319-
if (I->getType()->isIntegerTy() && I->getType()->getIntegerBitWidth() == 1)
320-
{
321-
llvm::IRBuilder<> builder(M.getContext());
322-
llvm::Instruction* aliveInst_clone = I->clone();
323-
aliveInst_clone->insertBefore(I->getNextNode());
324-
builder.SetInsertPoint(aliveInst_clone->getNextNode());
325-
llvm::Value* aliveInst_i8 = builder.CreateZExt(aliveInst_clone, builder.getInt8Ty());
326-
327-
builder.SetInsertPoint((*barrierInst)->getNextNode());
328-
llvm::Value* aliveInst_i1 = builder.CreateICmpEQ(aliveInst_i8, builder.getInt8(1));
329-
330-
I->replaceAllUsesWith(aliveInst_i1);
331-
I->eraseFromParent();
332-
m_LiveRegistersPerBarrier[*barrierInst].insert(dyn_cast<Instruction>(aliveInst_i8));
333-
m_aliveAcrossBarrier.insert(dyn_cast<Instruction>(aliveInst_i8));
334-
}
335-
else
336-
{
337-
m_LiveRegistersPerBarrier[*barrierInst].insert(I); // Insert the instruction as one that has to be stored and then restored
338-
m_aliveAcrossBarrier.insert(I);
339-
}
319+
m_LiveRegistersPerBarrier[*barrierInst].insert(I); // Insert the instruction as one that has to be stored and then restored
320+
m_aliveAcrossBarrier.insert(I);
340321
}
341322
}
342323
}

0 commit comments

Comments
 (0)