[all-commits] [llvm/llvm-project] 2c4749: [InstCombine] Add test cases for D142783. NFC"

Craig Topper via All-commits all-commits at lists.llvm.org
Mon Jan 30 17:48:44 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2c4749b823766f659615dac7c21e6c925c341ce7
      https://github.com/llvm/llvm-project/commit/2c4749b823766f659615dac7c21e6c925c341ce7
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2023-01-30 (Mon, 30 Jan 2023)

  Changed paths:
    M llvm/test/Transforms/InstCombine/add.ll

  Log Message:
  -----------
  [InstCombine] Add test cases for D142783. NFC"


  Commit: df76ff98e8e68ef00e61574ce6ac688e6e12b9df
      https://github.com/llvm/llvm-project/commit/df76ff98e8e68ef00e61574ce6ac688e6e12b9df
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2023-01-30 (Mon, 30 Jan 2023)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
    M llvm/test/Transforms/InstCombine/add.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/intrinsiccost.ll
    M llvm/test/Transforms/LoopVectorize/X86/intrinsiccost.ll
    M llvm/test/Transforms/LoopVectorize/X86/small-size.ll
    M llvm/test/Transforms/LoopVectorize/float-induction.ll
    M llvm/test/Transforms/LoopVectorize/if-conversion-nest.ll
    M llvm/test/Transforms/LoopVectorize/runtime-check.ll

  Log Message:
  -----------
  [InstCombine][LV] Fold (add (zext (add X, -1)), 1) -> (zext X) if X is non-zero.

This artifact can appear from the vectorizer. (add X, -1) is the
backedge taken count. It gets zero extended and then 1 is added to
it to get the trip count.

There is usually a dominating branch that rules out X being zero.

Alive: https://alive2.llvm.org/ce/z/NsRDwX


Compare: https://github.com/llvm/llvm-project/compare/3ab88e795c71...df76ff98e8e6


More information about the All-commits mailing list