[all-commits] [llvm/llvm-project] e0cc55: [IndVars] Teach widenLoopCompare to use sext if na...

Craig Topper via All-commits all-commits at lists.llvm.org
Tue Jun 10 12:53:01 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e0cc556ad4276c2c76e303c39616ad126bea56d6
      https://github.com/llvm/llvm-project/commit/e0cc556ad4276c2c76e303c39616ad126bea56d6
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2025-06-10 (Tue, 10 Jun 2025)

  Changed paths:
    M llvm/lib/Transforms/Utils/SimplifyIndVar.cpp
    A llvm/test/Transforms/IndVarSimplify/iv-cmp-sext.ll

  Log Message:
  -----------
  [IndVars] Teach widenLoopCompare to use sext if narrow IV is positive and other operand is already sext. (#142703)

This prevents us from ending up with (zext (sext X)). The zext will
require an instruction on targets where zext isn't free like RISC-V.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list