[PATCH] D130862: [LegalizeTypes][WIP] Improve splitting for urem by constant for some constants.
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 7 22:43:57 PDT 2022
craig.topper updated this revision to Diff 450701.
craig.topper added a comment.
Refactor to support UDIV and UDIVREM. The latter needed to support ARM.
Support constants that have trailing zeros such as 10 and 12 using the formula suggested by Eli.
Does not support breaking into 30-bit pieces.
Need to add more tests and comment cleanup. I did some local testing checking of a few divisors.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130862/new/
https://reviews.llvm.org/D130862
Files:
llvm/include/llvm/CodeGen/TargetLowering.h
llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
llvm/lib/Target/ARM/ARMISelLowering.cpp
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/ARM/div.ll
llvm/test/CodeGen/RISCV/div-by-constant.ll
llvm/test/CodeGen/RISCV/div.ll
llvm/test/CodeGen/RISCV/split-udiv-by-constant.ll
llvm/test/CodeGen/RISCV/split-urem-by-constant.ll
llvm/test/CodeGen/VE/Scalar/rem.ll
llvm/test/CodeGen/X86/divide-by-constant.ll
llvm/test/CodeGen/X86/divmod128.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130862.450701.patch
Type: text/x-patch
Size: 103251 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220808/639a84d6/attachment.bin>
More information about the llvm-commits
mailing list