[PATCH] D102803: [Verifier] Remove some redundant checks

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 19 13:37:27 PDT 2021


aeubanks created this revision.
aeubanks added a reviewer: dblaikie.
Herald added subscribers: dexonsmith, jfb, hiraditya.
aeubanks requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

These checks already exist as asserts when creating the corresponding
instruction. Anybody creating these instructions already need to take
care to not break these checks.

Move the check for unordered in cmpxchg from the verifier to an assert.
The LLParser already checks for this condition. Make the bitcode reader
also check it (even though it probably doesn't happen in practice since
it was already invalid).

Add some tests for cmpxchg ordering.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D102803

Files:
  llvm/lib/Bitcode/Reader/BitcodeReader.cpp
  llvm/lib/IR/Instructions.cpp
  llvm/lib/IR/Verifier.cpp
  llvm/test/Assembler/cmpxchg-ordering-2.ll
  llvm/test/Assembler/cmpxchg-ordering.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102803.346544.patch
Type: text/x-patch
Size: 4918 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210519/fc5d85aa/attachment.bin>


More information about the llvm-commits mailing list