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

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 9 07:31:42 PDT 2022


RKSimon added a comment.

LGTM with a couple of minors (although I'm not very familiar with the algorithm) - any other comments?



================
Comment at: llvm/include/llvm/CodeGen/TargetLowering.h:4713
+  /// \param InH High bits of the LHS of the operation. See InL for meaning.
+  /// \returns true if the node has been expanded, false if it has not.
+  bool expandDIVREMByConstant(SDNode *N, SmallVectorImpl<SDValue> &Result,
----------------
InL / InH -> LL / LH ?


================
Comment at: llvm/test/CodeGen/X86/divide-by-constant.ll:939
 define i64 @urem_i64_3_optsize(i64 %x) nounwind optsize {
-; X32-LABEL: urem_i64_3_optsize:
 ; X32:       # %bb.0: # %entry
----------------
why did you remove this?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130862/new/

https://reviews.llvm.org/D130862



More information about the llvm-commits mailing list