[PATCH] D71936: [SCCP] Use constant ranges for binary operators.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 17 15:08:10 PDT 2020


efriedma added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/SCCP.cpp:1023
+
+    ConstantRange R = A.binaryOp(cast<BinaryOperator>(&I)->getOpcode(), B);
+    mergeInValue(&I, LatticeVal::getRange(R));
----------------
Can we also use this codepath if one of the operands is overdefined/notconstant?  We aren't using any interesting information about the "constant" operand anyway.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71936





More information about the llvm-commits mailing list