[all-commits] [llvm/llvm-project] bff1f8: [InstCombine] complete (X << Z) / (Y << Z) --> X / Y

ZCBing via All-commits all-commits at lists.llvm.org
Thu Dec 22 19:57:20 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bff1f8c79beeb8f83b37be1fb23fa44330799250
      https://github.com/llvm/llvm-project/commit/bff1f8c79beeb8f83b37be1fb23fa44330799250
  Author: Chenbing Zheng <Chenbing.Zheng at streamcomputing.com>
  Date:   2022-12-23 (Fri, 23 Dec 2022)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
    M llvm/test/Transforms/InstCombine/div-shift.ll

  Log Message:
  -----------
  [InstCombine] complete (X << Z) / (Y << Z) --> X / Y

Add one more situations for this fold.
For unsigned div, 'nsw' on both shifts + 'nuw' on the dividend.

Alive2: https://alive2.llvm.org/ce/z/sELF76

Reviewed By: spatel

Differential Revision: https://reviews.llvm.org/D139997




More information about the All-commits mailing list