[all-commits] [llvm/llvm-project] f3e2f2: [IndVars] Expand icmp in preheader rather than in ...

Max Kazantsev via All-commits all-commits at lists.llvm.org
Tue Jan 24 23:41:44 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f3e2f26378400dbc785691ec38158ef4019208f8
      https://github.com/llvm/llvm-project/commit/f3e2f26378400dbc785691ec38158ef4019208f8
  Author: Max Kazantsev <mkazantsev at azul.com>
  Date:   2023-01-25 (Wed, 25 Jan 2023)

  Changed paths:
    M llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
    M llvm/test/Transforms/IndVarSimplify/AArch64/widen-loop-comp.ll
    M llvm/test/Transforms/IndVarSimplify/X86/widening-vs-and-elimination.ll
    M llvm/test/Transforms/IndVarSimplify/predicated_ranges.ll
    M llvm/test/Transforms/IndVarSimplify/turn-to-invariant.ll

  Log Message:
  -----------
  [IndVars] Expand icmp in preheader rather than in loop

The motivation is that 'createInvariantCond' unconditionally
builds icmp in the loop block,  while it could always do it
in preheader. Build it in preheader instead.

Patch by Aleksandr Popov!

Differential Revision: https://reviews.llvm.org/D141994
Reviewed By: nikic




More information about the All-commits mailing list