[PATCH] D115388: [NFC][Verifier] Remove checks for atomic loads/stores that alignment is non-zero
Arthur Eubanks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 8 13:06:02 PST 2021
aeubanks created this revision.
aeubanks added a reviewer: dblaikie.
Herald added subscribers: dexonsmith, hiraditya.
aeubanks requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
The alignment is never 0 since getAlign() returns 1 << bits.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D115388
Files:
llvm/lib/IR/Verifier.cpp
Index: llvm/lib/IR/Verifier.cpp
===================================================================
--- llvm/lib/IR/Verifier.cpp
+++ llvm/lib/IR/Verifier.cpp
@@ -3742,8 +3742,6 @@
Assert(LI.getOrdering() != AtomicOrdering::Release &&
LI.getOrdering() != AtomicOrdering::AcquireRelease,
"Load cannot have Release ordering", &LI);
- Assert(LI.getAlignment() != 0,
- "Atomic load must specify explicit alignment", &LI);
Assert(ElTy->isIntOrPtrTy() || ElTy->isFloatingPointTy(),
"atomic load operand must have integer, pointer, or floating point "
"type!",
@@ -3770,8 +3768,6 @@
Assert(SI.getOrdering() != AtomicOrdering::Acquire &&
SI.getOrdering() != AtomicOrdering::AcquireRelease,
"Store cannot have Acquire ordering", &SI);
- Assert(SI.getAlignment() != 0,
- "Atomic store must specify explicit alignment", &SI);
Assert(ElTy->isIntOrPtrTy() || ElTy->isFloatingPointTy(),
"atomic store operand must have integer, pointer, or floating point "
"type!",
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115388.392908.patch
Type: text/x-patch
Size: 1101 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211208/6df6c834/attachment.bin>
More information about the llvm-commits
mailing list