[PATCH] D109676: [HardwareLoops] put +1 for loop count before zero extension

ChenZheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 13 02:47:39 PDT 2021


shchenz created this revision.
shchenz added reviewers: samparker, reames, JanekvO, nikic, jsji.
Herald added subscribers: hiraditya, nemanjai.
shchenz requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Putting the +1 before the zero-extend will allow scalar evolution to fold the expression in some cases.

This issue is first tried in https://reviews.llvm.org/D91724 and seems there is some issue with that patch. This patch fixes the issues in that patch.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D109676

Files:
  llvm/include/llvm/Analysis/TargetTransformInfo.h
  llvm/lib/Analysis/TargetTransformInfo.cpp
  llvm/lib/CodeGen/HardwareLoops.cpp
  llvm/test/CodeGen/PowerPC/loop-instr-prep-non-const-increasement.ll
  llvm/test/CodeGen/PowerPC/mma-phi-accs.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D109676.372191.patch
Type: text/x-patch
Size: 8011 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210913/e0586699/attachment.bin>


More information about the llvm-commits mailing list