@@ -2281,22 +2281,23 @@ CVariable* CShader::GetSymbol(llvm::Value *value, bool fromConstantPool)
22812281 return it->second ;
22822282 }
22832283
2284- if (IGC_IS_FLAG_ENABLED (EnableDeSSAAlias) && m_deSSA-> isAlias (value) )
2284+ if (IGC_IS_FLAG_ENABLED (EnableDeSSAAlias))
22852285 {
22862286 // Generate CVariable alias.
22872287 // Value and its aliasee must be of the same size.
22882288 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+ }
23002301 }
23012302
23022303 if (IGC_IS_FLAG_ENABLED (EnableVariableAlias))
0 commit comments