[PATCH] D112895: [CVP] Canonicalize signed relational comparisons of scalar integers to unsigned comparison predicates

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 31 15:30:31 PDT 2021


lebedev.ri marked an inline comment as done.
lebedev.ri added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp:302
+  if (Cmp->getType()->isVectorTy() ||
+      !Cmp->getOperand(0)->getType()->isIntegerTy())
+    return false;
----------------
nikic wrote:
> Second condition is probably redundant, can't have anything else in a scalar icmp.
While scalar icmp does produce i1 result, it may have pointer operands,
and `LVI->getConstantRange()` asserts when that happens.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112895



More information about the llvm-commits mailing list