[PATCH] D62871: [Codegen] (X & (C l>>/<< Y)) ==/!= 0 --> ((X <</l>> Y) & C) ==/!= 0 fold

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 5 08:54:06 PDT 2019


nikic added a comment.

@xbolva00 Looks like an instcombine fail:

  define dso_local i32 @do_shift(i32, i32) local_unnamed_addr #0 {
    %3 = tail call i32 @llvm.usub.sat.i32(i32 %1, i32 %0)
    %4 = add i32 %3, %0
    ret i32 %4
  }

usub.sat(a, b) + b should be canonicalized to umax(a, b).


Repository:
  rL LLVM

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

https://reviews.llvm.org/D62871





More information about the llvm-commits mailing list