[all-commits] [llvm/llvm-project] 6e6fe2: [ValueTracking] peek through extends in haveNoComm...

Sanjay Patel via All-commits all-commits at lists.llvm.org
Tue Dec 13 14:03:47 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6e6fe2768934d0aabc720d05bcf3df55b1f1733d
      https://github.com/llvm/llvm-project/commit/6e6fe2768934d0aabc720d05bcf3df55b1f1733d
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2022-12-13 (Tue, 13 Dec 2022)

  Changed paths:
    M llvm/lib/Analysis/ValueTracking.cpp
    M llvm/test/Transforms/InstCombine/add.ll

  Log Message:
  -----------
  [ValueTracking] peek through extends in haveNoCommonBitsSet (2nd try)

The 1st try was not clean because a portion of the code diff
made it into the pre-commit patch to add tests. This should
be the same end result without the muddied code diff.

Original commit message:

In cases with matching extends, this allows changing an 'add'
into an 'or' and narrowing the 'or' which then simplifies to
a constant.

In cases with opposite extends, we just convert to an 'or'
currently, but that could be reduced too.

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




More information about the All-commits mailing list