projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3ad5216
)
Fix assert to use getTypeStoreSize instead of getPrimitiveSizeInBits,
author
James Y Knight
<jyknight@google.com>
Fri, 26 Feb 2021 15:33:24 +0000
(10:33 -0500)
committer
James Y Knight
<jyknight@google.com>
Fri, 26 Feb 2021 16:08:00 +0000
(11:08 -0500)
per comment on D97223.
llvm/lib/CodeGen/AtomicExpandPass.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/CodeGen/AtomicExpandPass.cpp
b/llvm/lib/CodeGen/AtomicExpandPass.cpp
index
f04a8d2
..
85d38c4
100644
(file)
--- a/
llvm/lib/CodeGen/AtomicExpandPass.cpp
+++ b/
llvm/lib/CodeGen/AtomicExpandPass.cpp
@@
-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