[PATCH] D83360: [InstSimplify] Remove select ?, undef, X -> X and select ?, X, undef -> X

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 9 13:05:38 PDT 2020


efriedma added a subscriber: tgt.
efriedma added a comment.

> that's fine but I still don't understand why the counterexample to my version says %x2 in @src can be undef

If I'm understanding correctly, this reduces to something like the following:

define i32 @src() {

  %x2 = freeze i32 undef
  ret i32 %x2

}

define i32 @tgt() {

  ret i32 undef

}

This seems a little suspect, yes.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D83360





More information about the llvm-commits mailing list