[PATCH] D44102: Teach CorrelatedValuePropagation to reduce the width of udiv/urem instructions.
Sanjoy Das via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 6 23:28:32 PST 2018
sanjoy accepted this revision.
sanjoy added inline comments.
This revision is now accepted and ready to land.
================
Comment at: llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp:438
+/// sufficient to contain its operands.
+static bool processUDivOrURem(BinaryOperator *SDI, LazyValueInfo *LVI) {
+ assert(SDI->getOpcode() == Instruction::UDiv ||
----------------
Not sure what `SDI` stands for here -- how about just calling it `Inst`?
================
Comment at: llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp:447
+ auto OrigWidth = SDI->getType()->getIntegerBitWidth();
+ ConstantRange R(OrigWidth, /*isFullset=*/false);
+ for (Value *Operand : SDI->operands()) {
----------------
How about s/`R`/`OperandRange`/?
https://reviews.llvm.org/D44102
More information about the llvm-commits
mailing list