[all-commits] [llvm/llvm-project] a2099d: [InstCombine] add tests for srem-by-2; NFC

RotateRight via All-commits all-commits at lists.llvm.org
Tue Apr 20 14:10:40 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a2099d6542b978ae7c604e7d3012f9f00054a859
      https://github.com/llvm/llvm-project/commit/a2099d6542b978ae7c604e7d3012f9f00054a859
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2021-04-20 (Tue, 20 Apr 2021)

  Changed paths:
    M llvm/test/Transforms/InstCombine/lshr.ll
    M llvm/test/Transforms/InstCombine/rem.ll

  Log Message:
  -----------
  [InstCombine] add tests for srem-by-2; NFC


  Commit: 1e202e8f393a8bf8a9066482e66ffe2135dde9bf
      https://github.com/llvm/llvm-project/commit/1e202e8f393a8bf8a9066482e66ffe2135dde9bf
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2021-04-20 (Tue, 20 Apr 2021)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp
    M llvm/test/Transforms/InstCombine/lshr.ll

  Log Message:
  -----------
  [InstCombine] fold shift-of-srem-by-2 to mask+shift

There are several potential srem-by-2 folds
because the result is known {-1,0,1}.

https://alive2.llvm.org/ce/z/LuVyeK


Compare: https://github.com/llvm/llvm-project/compare/d2de2d172446...1e202e8f393a


More information about the All-commits mailing list