mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-27 14:34:58 +00:00
Tweak check to avoid integer overflow (for insanely large alignments)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174482 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c342d9d345
commit
607acd66f4
@ -3520,7 +3520,7 @@ void SelectionDAGBuilder::visitAtomicLoad(const LoadInst &I) {
|
||||
|
||||
EVT VT = TLI.getValueType(I.getType());
|
||||
|
||||
if (I.getAlignment() * 8 < VT.getSizeInBits())
|
||||
if (I.getAlignment() < VT.getSizeInBits() / 8)
|
||||
report_fatal_error("Cannot generate unaligned atomic load");
|
||||
|
||||
SDValue L =
|
||||
@ -3550,7 +3550,7 @@ void SelectionDAGBuilder::visitAtomicStore(const StoreInst &I) {
|
||||
|
||||
EVT VT = TLI.getValueType(I.getValueOperand()->getType());
|
||||
|
||||
if (I.getAlignment() * 8 < VT.getSizeInBits())
|
||||
if (I.getAlignment() < VT.getSizeInBits() / 8)
|
||||
report_fatal_error("Cannot generate unaligned atomic store");
|
||||
|
||||
if (TLI.getInsertFencesForAtomic())
|
||||
|
Loading…
x
Reference in New Issue
Block a user