Skip to content

Commit

Permalink
MemoryBuiltins: getAllocAlignment is now useful for non-allocator funcs
Browse files Browse the repository at this point in the history
This has been true since dba7313, but
didn't matter until now because clang wasn't emitting allocalign
attributes.

Differential Revision: https://reviews.llvm.org/D121640
  • Loading branch information
durin42 committed Apr 6, 2022
1 parent 538c771 commit 33b1f41
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions llvm/lib/Analysis/MemoryBuiltins.cpp
Expand Up @@ -334,8 +334,6 @@ bool llvm::isAllocRemovable(const CallBase *CB, const TargetLibraryInfo *TLI) {

Value *llvm::getAllocAlignment(const CallBase *V,
const TargetLibraryInfo *TLI) {
assert(isAllocationFn(V, TLI));

const Optional<AllocFnsTy> FnData = getAllocationData(V, AnyAlloc, TLI);
if (FnData.hasValue() && FnData->AlignParam >= 0) {
return V->getOperand(FnData->AlignParam);
Expand Down

0 comments on commit 33b1f41

Please sign in to comment.