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

Craig Topper via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 8 14:44:02 PDT 2020


craig.topper added a comment.

Wasn't @majnemer asking about

  define i32 @src(i1 %cond, i32 %x) {
    %xf = freeze i32 %x
    %s = select i1 %cond, i32 %xf, i32 undef
    ret i32 %s
  }

which is legal. I'm going to work on supporting known non-poison cases.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D83360





More information about the cfe-commits mailing list