[all-commits] [llvm/llvm-project] 678b9c: [InstCombine] try difference-of-shifts factorizati...

RotateRight via All-commits all-commits at lists.llvm.org
Tue Nov 24 10:56:58 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 678b9c5dde0d119e91f5f905c3d9101cf8c514f9
      https://github.com/llvm/llvm-project/commit/678b9c5dde0d119e91f5f905c3d9101cf8c514f9
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2020-11-24 (Tue, 24 Nov 2020)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
    M llvm/test/Transforms/InstCombine/sub-gep.ll
    M llvm/test/Transforms/InstCombine/sub.ll

  Log Message:
  -----------
  [InstCombine] try difference-of-shifts factorization before negator

We need to preserve wrapping flags to allow better folds.
The cases with geps may be non-intuitive, but that appears to agree with Alive2:
https://alive2.llvm.org/ce/z/JQcqw7
We create 'nsw' ops independent from the original wrapping on the sub.




More information about the All-commits mailing list