[PATCH] D150353: [CVP] Don't introduce zero after truncating when narrowUDivOrSDiv

Noah Goldstein via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 11 07:49:08 PDT 2023


goldstein.w.n added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp:813
+  // contain zero, then we should ensure the constant range after truncating
+  // also does not contain zero. Otherwise we may introduce an UB.
+  if (!YCRAtDef.contains(APInt::getZero(YCRAtDef.getBitWidth())) &&
----------------
`narrowSDivOrSRem` i think


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D150353



More information about the llvm-commits mailing list