[all-commits] [llvm/llvm-project] 94128f: [Test] Add tests showing congruent IVs not removed...

Dmitry Makogon via All-commits all-commits at lists.llvm.org
Tue Nov 2 07:52:49 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 94128f04d60ed49624b1461df509a3dbb8c31f9f
      https://github.com/llvm/llvm-project/commit/94128f04d60ed49624b1461df509a3dbb8c31f9f
  Author: Dmitry Makogon <d.makogon at g.nsu.ru>
  Date:   2021-11-02 (Tue, 02 Nov 2021)

  Changed paths:
    M llvm/test/Transforms/IndVarSimplify/widen-loop-comp.ll

  Log Message:
  -----------
  [Test] Add tests showing congruent IVs not removed by IndVars

In the added cases we have two congruent IVs. IndVars widens at least one of them.
If they are both widened, then one of them is erased as they stay congruent after
widening. However if only one IV is widened, the other one stays in the loop.
We can simply erase the narrow IV and replace its uses with truncates of the
widest IV.




More information about the All-commits mailing list