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

Nuno Lopes via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 19 08:43:42 PDT 2020


nlopes 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
+
----------------
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)


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

https://reviews.llvm.org/D87965



More information about the llvm-commits mailing list