[PATCH] D71938: [SCCP] Use constant ranges for casts.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 27 16:00:05 PDT 2020


efriedma added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/SCCP.cpp:847
     markConstant(&I, C);
+    mergeInValue(&I, LatticeVal::get(C));
+  } else if (OpSt.isConstantRange() && I.getDestTy()->isIntegerTy()) {
----------------
This is calling both markConstant and mergeInValue?


================
Comment at: llvm/lib/Transforms/Scalar/SCCP.cpp:849
+  } else if (OpSt.isConstantRange() && I.getDestTy()->isIntegerTy()) {
+    LatticeVal &LV = getValueState(&I);
+    ConstantRange OpRange = OpSt.getConstantRange();
----------------
If I'm following correctly, both the source and destination must be integers, so this is one of bitcast/trunc/sext/zext?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71938





More information about the llvm-commits mailing list