[llvm-branch-commits] [llvm] [AtomicExpand] Avoid sized call when expanding load atomic vector (PR #120716)
Matt Arsenault via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Dec 20 04:47:58 PST 2024
================
@@ -1884,7 +1884,10 @@ bool AtomicExpandImpl::expandAtomicOpToLibcall(
IRBuilder<> Builder(I);
IRBuilder<> AllocaBuilder(&I->getFunction()->getEntryBlock().front());
- bool UseSizedLibcall = canUseSizedAtomicCall(Size, Alignment, DL);
+ const bool IsAtomic =
+ isa<LoadInst>(I) ? cast<LoadInst>(I)->isAtomic() : false;
+ const bool UseSizedLibcall = !(I->getType()->isVectorTy() && IsAtomic) &&
----------------
arsenm wrote:
This shouldn't need to consider whether it's atomic or the type. The sized call should work fine. Some casts may be necessary
https://github.com/llvm/llvm-project/pull/120716
More information about the llvm-branch-commits
mailing list