[PATCH] D134427: [Verifier] Allow undef token argument to llvm.experimental.gc.result

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 27 05:56:14 PDT 2022


nikic resigned from this revision.
nikic added a comment.
This revision is now accepted and ready to land.

Thanks for the explanation. I do wonder how we end up in the situation where the gc.statepoint gets removed, but the gc.result is not also removed.



================
Comment at: llvm/lib/IR/Verifier.cpp:5120
+
+    if (isa<UndefValue>(Call.getArgOperand(0)) ||
+        isa<PoisonValue>(Call.getArgOperand(0)))
----------------
apilipenko wrote:
> 
Just `isa<UndefValue>()` is sufficient, it also handles poison.


================
Comment at: llvm/test/Verifier/gc_result_token.ll:8
+entry:
+    br i1 true, label %label_1, label %label_2
+
----------------
Branch is unnecessary here -- you want label_2 to be unreachable in the CFG, not just dynamically dead.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134427/new/

https://reviews.llvm.org/D134427



More information about the llvm-commits mailing list