mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-01 00:33:09 +00:00
Verifier: Give the right message for bad atomic loads
Talk about load (not store) on an invalid atomic load. <rdar://problem/16287567> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205777 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
35d647b6f3
commit
bd382db782
@ -1730,11 +1730,11 @@ void Verifier::visitLoadInst(LoadInst &LI) {
|
|||||||
"Atomic load must specify explicit alignment", &LI);
|
"Atomic load must specify explicit alignment", &LI);
|
||||||
if (!ElTy->isPointerTy()) {
|
if (!ElTy->isPointerTy()) {
|
||||||
Assert2(ElTy->isIntegerTy(),
|
Assert2(ElTy->isIntegerTy(),
|
||||||
"atomic store operand must have integer type!",
|
"atomic load operand must have integer type!",
|
||||||
&LI, ElTy);
|
&LI, ElTy);
|
||||||
unsigned Size = ElTy->getPrimitiveSizeInBits();
|
unsigned Size = ElTy->getPrimitiveSizeInBits();
|
||||||
Assert2(Size >= 8 && !(Size & (Size - 1)),
|
Assert2(Size >= 8 && !(Size & (Size - 1)),
|
||||||
"atomic store operand must be power-of-two byte-sized integer",
|
"atomic load operand must be power-of-two byte-sized integer",
|
||||||
&LI, ElTy);
|
&LI, ElTy);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user