[PATCH] D156610: [WIP][LSR] Transform div instruction to add in loop

LuoYuanke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 30 05:24:44 PDT 2023


LuoYuanke created this revision.
Herald added a subscriber: hiraditya.
Herald added a project: All.
LuoYuanke requested review of this revision.
Herald added subscribers: llvm-commits, wangpc.
Herald added a project: LLVM.

Some target don't have div instruction or div is very expensive. For large
integer type, div is transformed to non-div instruction by expand-div-rem
pass. Transform div into add in loop help to improve the performance.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D156610

Files:
  llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
  llvm/test/Transforms/LoopStrengthReduce/div.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D156610.545427.patch
Type: text/x-patch
Size: 9634 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230730/2f8c55b7/attachment.bin>


More information about the llvm-commits mailing list