Skip to content

Commit 1afad21

Browse files
Addressing reviewers
1 parent 9053c7a commit 1afad21

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

llvm/lib/Analysis/LoopAccessAnalysis.cpp

+1-5
Original file line numberDiff line numberDiff line change
@@ -2282,11 +2282,7 @@ static bool isMathLibCallMemWriteOnly(const TargetLibraryInfo *TLI,
22822282
if (!Call)
22832283
return false;
22842284

2285-
Function *F = Call->getCalledFunction();
2286-
if (!F->hasFnAttribute(Attribute::AttrKind::Memory))
2287-
return false;
2288-
2289-
auto ME = F->getFnAttribute(Attribute::AttrKind::Memory).getMemoryEffects();
2285+
auto ME = Call->getMemoryEffects();
22902286
LibFunc Func;
22912287
TLI->getLibFunc(*Call, Func);
22922288
return ME.onlyWritesMemory() && ME.onlyAccessesArgPointees() &&

0 commit comments

Comments
 (0)