[PATCH] D115985: [JumpThreading] Remove unreachable blocks after jumpthreading

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 21 00:06:34 PST 2021


nikic added a comment.

@duanyangjing So you're saying that keeping the unreachable block is a correctness issue, not an optimization issue? Is the IR produced by JumpThreading invalid in some way? Your comment in the test indicates that this causes issues in a subsequent pass, but we generally expect passes to be able to deal with unreachable code and the peculiar IR constructs that can appear inside it.



================
Comment at: llvm/test/Transforms/JumpThreading/SimplifyUnreachableBlock.ll:1
+; RUN: opt < %s -jump-threading -S | FileCheck %s
+
----------------
Please use update_test_checks.py to generate the test checks. I'd also recommend running it through `opt -instnamer`, as anonymous names make it hard to modify the test case.


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

https://reviews.llvm.org/D115985



More information about the llvm-commits mailing list