[PATCH] D130862: [LegalizeTypes] Improve splitting for urem/udiv by constant for some constants.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 4 21:56:27 PDT 2022


craig.topper updated this revision to Diff 457887.
craig.topper added a comment.

-Pre-commit tests.
-Make APInt const. It will need to be changed back to non-const when we support even divisors.
-Disable for optsize instead of minsize. I think that matches gcc.


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.457887.patch
Type: text/x-patch
Size: 104152 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220905/2afd72c3/attachment-0001.bin>


More information about the llvm-commits mailing list