[PATCH] D87965: [InstCombine] replace phi values from unreachable blocks with 'undef'

Juneyoung Lee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 20 15:34:24 PDT 2020


aqjune added inline comments.


================
Comment at: llvm/test/Transforms/InstCombine/phi.ll:1207
+  %p = phi double [ %conv, %g.exit ], [ undef, %entry ]
+  br i1 undef, label %for.end, label %for.body
+
----------------
nlopes wrote:
> The patch LGTM. Just a side comment: we should avoid tests with `br undef` as we define that as UB, and therefore it makes any transformation correct. Which in turn essentially disables verification by Alive2.
> (I know we still have many such tests. I think we talked in the past of writing a script to do a mass change of these to use input variables)
I remember bugpoint was the culprit who inserted a lot of br undef.
I tried to fix it in the past, but it wasn't trivial.



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D87965



More information about the llvm-commits mailing list