File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -702,15 +702,16 @@ struct AAAMDAttributesFunction : public AAAMDAttributes {
702702 const auto &CB = cast<CallBase>(I);
703703 const Function *Callee = CB.getCalledFunction ();
704704
705- if (Callee && Callee->isIntrinsic ())
705+ // Callee == 0 for inline asm or indirect call with known callees.
706+ // In the latter case, updateImpl() already checked the callees and we
707+ // know their FLAT_SCRATCH_INIT bit is set.
708+ // If function has indirect call with unknown callees, the bit is
709+ // already removed in updateImpl() and execution won't reach here.
710+ if (!Callee)
711+ return true ;
712+ else
706713 return Callee->getIntrinsicID () !=
707714 Intrinsic::amdgcn_addrspacecast_nonnull;
708-
709- // Return true for all other cases, including (1)inline asm, (2)direct
710- // call, and (3)indirect call with known callees. For (2) and (3)
711- // updateImpl() already checked the callees and we know their
712- // FLAT_SCRATCH_INIT bit is set.
713- return true ;
714715 };
715716
716717 bool UsedAssumedInformation = false ;
You can’t perform that action at this time.
0 commit comments