[all-commits] [llvm/llvm-project] 2552f6: [InstCombine] fold mask op into casted shift (PR46...

RotateRight via All-commits all-commits at lists.llvm.org
Sun Jun 7 06:33:44 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 2552f65183ebb43cdd6de951c63a3dcbfa021b5e
      https://github.com/llvm/llvm-project/commit/2552f65183ebb43cdd6de951c63a3dcbfa021b5e
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2020-06-07 (Sun, 07 Jun 2020)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
    M llvm/test/Transforms/InstCombine/and.ll

  Log Message:
  -----------
  [InstCombine] fold mask op into casted shift (PR46013)

https://rise4fun.com/Alive/Qply8

  Pre: C2 == (-1 u>> zext(C1))
  %a = ashr %x, C1
  %s = sext %a to i16
  %r = and i16 %s, C2
    =>
  %s2 = sext %x to i16
  %r = lshr i16 %s2, zext(C1)

https://bugs.llvm.org/show_bug.cgi?id=46013




More information about the All-commits mailing list