[PATCH] D67196: [Verifier] add invariant check for callbr

Nick Desaulniers via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 4 15:27:14 PDT 2019


nickdesaulniers created this revision.
nickdesaulniers added reviewers: craig.topper, void.
Herald added subscribers: llvm-commits, hiraditya, kristof.beyls, javed.absar.
Herald added a project: LLVM.

The list of indirect labels should ALWAYS have their blockaddresses as
argument operands to the callbr (but not necessarily the other way
around).  Add an invariant that checks this.

The verifier catches a bad test case that was added recently in r368478.
I think that was a simple mistake, and the test was made less strict in
regards to the precise addresses (as those weren't specifically the
point of the test).

This invariant will be used to find a reported bug.

Link: https://www.spinics.net/lists/arm-kernel/msg753473.html
Link: https://github.com/ClangBuiltLinux/linux/issues/649


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D67196

Files:
  llvm/lib/IR/Verifier.cpp
  llvm/test/CodeGen/AArch64/callbr-asm-obj-file.ll
  llvm/test/Verifier/callbr.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67196.218800.patch
Type: text/x-patch
Size: 3915 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190904/80040972/attachment.bin>


More information about the llvm-commits mailing list