[all-commits] [llvm/llvm-project] db2893: [IndVars] Pass TTI to replaceCongruentIVs

Dmitry Makogon via All-commits all-commits at lists.llvm.org
Mon Nov 8 04:22:12 PST 2021


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

  Changed paths:
    M llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
    M llvm/test/Transforms/GVN/gvn-eliminate-duplicating-phis.ll
    M llvm/test/Transforms/IndVarSimplify/X86/pr27133.ll
    M llvm/test/Transforms/IndVarSimplify/widen-loop-comp.ll
    M llvm/test/Transforms/LoopVectorize/X86/gather_scatter.ll
    M llvm/test/Transforms/PhaseOrdering/X86/pixel-splat.ll
    M llvm/test/Transforms/PhaseOrdering/X86/vdiv.ll

  Log Message:
  -----------
  [IndVars] Pass TTI to replaceCongruentIVs

In IndVarSimplify after simplifying and extending loop IVs we call 'replaceCongruentIVs'.
This function optionally takes a TTI argument to be able to replace narrow IVs uses
with truncates of the widest one.
For some reason the TTI wasn't passed to the function, so it couldn't perform such
transform.
This patch fixes it.

Reviewed By: mkazantsev

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




More information about the All-commits mailing list