Fix assert to use getTypeStoreSize instead of getPrimitiveSizeInBits,

per comment on D97223.
This commit is contained in:
James Y Knight 2021-02-26 10:33:24 -05:00
parent 3ad5216ed8
commit 740e69b6fd
1 changed files with 2 additions and 1 deletions

View File

@ -1034,7 +1034,8 @@ Value *AtomicExpand::insertRMWLLSCLoop(
BasicBlock *BB = Builder.GetInsertBlock();
Function *F = BB->getParent();
assert(AddrAlign >= ResultTy->getPrimitiveSizeInBits() / 8 &&
assert(AddrAlign >=
F->getParent()->getDataLayout().getTypeStoreSize(ResultTy) &&
"Expected at least natural alignment at this point.");
// Given: atomicrmw some_op iN* %addr, iN %incr ordering