[PATCH] D126962: [SCCP] Don't mark edges feasible when resolving undefs

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 27 02:34:50 PDT 2022


fhahn added a comment.

It looks like this regressed DCE in some cases when using the default optimization pipeline. The reproducer for `opt -sccp -jump-threading` is:

https://llvm.godbolt.org/z/TbGYvo7x8

  declare void @foo()
  declare void @bar()
  
  define void @test(i1 %c) {
  entry:
    br i1 %c, label %unreachable, label %next
  
  next:
    br i1 undef, label %exit, label %unreachable
  
  exit:
    call void @foo()
    ret void
  
  unreachable:
    call void @bar()
    unreachable
  }


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D126962



More information about the llvm-commits mailing list