[PATCH] D137165: [JumpThreading] Copy profile metadata on select unfolding

Evgeniy via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 9 04:34:25 PST 2022


ebrevnov added a comment.

Looks OK, except mentioned nit.



================
Comment at: llvm/lib/Transforms/Scalar/JumpThreading.cpp:2768
+    uint64_t TrueWeight, FalseWeight;
+    if (extractBranchWeights(*SI, TrueWeight, FalseWeight)) {
+      SmallVector<BranchProbability, 2> BP;
----------------
You should check sum of TrueWeight and FalseWeight is not 0


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D137165



More information about the llvm-commits mailing list