[llvm] [RISCV] Cost UDIV/UREM by a constant power of 2 as a SHL/AND in getArithmeticInstrCost() (PR #179570)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 17 02:55:00 PDT 2026


================
@@ -367,8 +367,8 @@ InstructionCost X86TTIImpl::getArithmeticInstrCost(
   }
 
   // Vector unsigned division/remainder will be simplified to shifts/masks.
-  if ((ISD == ISD::UDIV || ISD == ISD::UREM) &&
-      Op2Info.isConstant() && Op2Info.isPowerOf2()) {
+  if ((ISD == ISD::UDIV || ISD == ISD::UREM) && Op2Info.isConstant() &&
+      Op2Info.isPowerOf2()) {
----------------
lukel97 wrote:

Looks like a rogue clang-format change

https://github.com/llvm/llvm-project/pull/179570


More information about the llvm-commits mailing list