@@ -2281,22 +2281,23 @@ CVariable* CShader::GetSymbol(llvm::Value *value, bool fromConstantPool)
2281
2281
return it->second ;
2282
2282
}
2283
2283
2284
- if (IGC_IS_FLAG_ENABLED (EnableDeSSAAlias) && m_deSSA-> isAlias (value) )
2284
+ if (IGC_IS_FLAG_ENABLED (EnableDeSSAAlias))
2285
2285
{
2286
2286
// Generate CVariable alias.
2287
2287
// Value and its aliasee must be of the same size.
2288
2288
Value* Aliasee = m_deSSA->getAliasee (value);
2289
- CVariable *Base = GetSymbol (Aliasee);
2290
- if (Aliasee == value) {
2291
- return Base;
2292
- }
2293
- Type *Ty = value->getType ();
2294
- VectorType* VTy = dyn_cast<VectorType>(Ty);
2295
- Type *BTy = VTy ? VTy->getElementType () : Ty;
2296
- VISA_Type visaTy = GetType (BTy);
2297
- CVariable* AliasVar = GetNewAlias (Base, visaTy, 0 , Base->GetNumberElement ());
2298
- symbolMapping.insert (std::pair<llvm::Value*, CVariable*>(value, AliasVar));
2299
- return AliasVar;
2289
+ if (Aliasee != value)
2290
+ {
2291
+ // An aliaser
2292
+ CVariable *Base = GetSymbol (Aliasee);
2293
+ Type *Ty = value->getType ();
2294
+ VectorType* VTy = dyn_cast<VectorType>(Ty);
2295
+ Type *BTy = VTy ? VTy->getElementType () : Ty;
2296
+ VISA_Type visaTy = GetType (BTy);
2297
+ CVariable* AliasVar = GetNewAlias (Base, visaTy, 0 , Base->GetNumberElement ());
2298
+ symbolMapping.insert (std::pair<llvm::Value*, CVariable*>(value, AliasVar));
2299
+ return AliasVar;
2300
+ }
2300
2301
}
2301
2302
2302
2303
if (IGC_IS_FLAG_ENABLED (EnableVariableAlias))
0 commit comments