mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-03-07 11:59: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> llvm-svn: 205777
This commit is contained in:
parent
94832c958f
commit
fc7ea3fbd1
@ -1730,11 +1730,11 @@ void Verifier::visitLoadInst(LoadInst &LI) {
|
||||
"Atomic load must specify explicit alignment", &LI);
|
||||
if (!ElTy->isPointerTy()) {
|
||||
Assert2(ElTy->isIntegerTy(),
|
||||
"atomic store operand must have integer type!",
|
||||
"atomic load operand must have integer type!",
|
||||
&LI, ElTy);
|
||||
unsigned Size = ElTy->getPrimitiveSizeInBits();
|
||||
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);
|
||||
}
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user