mirror of
https://github.com/intel/intel-graphics-compiler.git
synced 2025-11-04 08:21:06 +08:00
prepare for supporting load combining
Add support in emit pass/dessa/wianalysis to support load combining that uses struct for combining. As load combining is off, this change has no functional issue.
This commit is contained in:
@ -697,16 +697,25 @@ void DeSSA::CoalesceAliasInst()
|
||||
{
|
||||
if (GenIntrinsicInst* GII = dyn_cast<GenIntrinsicInst>(I))
|
||||
{
|
||||
if (GII->getIntrinsicID() == GenISAIntrinsic::GenISA_bitcastfromstruct &&
|
||||
auto GIIid = GII->getIntrinsicID();
|
||||
if ((GIIid == GenISAIntrinsic::GenISA_bitcastfromstruct ||
|
||||
GIIid == GenISAIntrinsic::GenISA_bitcasttostruct) &&
|
||||
!isa<Constant>(GII->getOperand(0)))
|
||||
{
|
||||
// special cast just for load/store.
|
||||
Value* D = GII;
|
||||
Value* S = GII->getOperand(0);
|
||||
|
||||
// D must be int or int vector type; S must be struct type.
|
||||
IGC_ASSERT(D->getType()->getScalarType()->isIntegerTy());
|
||||
IGC_ASSERT(S->getType()->isStructTy());
|
||||
if (GIIid == GenISAIntrinsic::GenISA_bitcastfromstruct) {
|
||||
// D must be int or int vector type; S must be struct type.
|
||||
IGC_ASSERT(D->getType()->getScalarType()->isIntegerTy());
|
||||
IGC_ASSERT(S->getType()->isStructTy());
|
||||
}
|
||||
else if (GIIid == GenISAIntrinsic::GenISA_bitcasttostruct) {
|
||||
// S must be int or int vector type; D must be struct type.
|
||||
IGC_ASSERT(S->getType()->getScalarType()->isIntegerTy());
|
||||
IGC_ASSERT(D->getType()->isStructTy());
|
||||
}
|
||||
|
||||
AddAlias(S);
|
||||
Value* aliasee = AliasMap[S];
|
||||
|
||||
Reference in New Issue
Block a user