[PATCH] D94470: [LSR] Don't break a critical edge if parent ends with "callbr"
Nick Desaulniers via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 12 14:18:11 PST 2021
nickdesaulniers added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:5594-5595
+
+ // Also bail out if we have a PHI with a value from a block ending in a
+ // CallBrInst, because those also can't be split for similar reasons.
+ for (BasicBlock *PredBB : PN->blocks())
----------------
MaskRay wrote:
> void wrote:
> > nickdesaulniers wrote:
> > > Can this comment be made more precise, I don't think what's described is what's being tested?
> > It's pretty accurate as is. :) I'm not sure how else to word it.
> The change only affects `llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp`, not any codegen part, so I hope this can be tested with opt. Usually this should check the produced instructions.
>
> If the resulting IR is correct but codegen somehow crashes, then it is probably a codegen bug which should be separately fixed. If the output IR is actually incorrect, then the IR verifier should be fixed instead.
>
> Anyway I think the test should be added in an appropriate place and if this uncovers other issues those other issues should be reported as well.
Ah, yes sorry, I was looking at the first `phi` thinking WTF; didn't notice the second `phi` until just now.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94470/new/
https://reviews.llvm.org/D94470
More information about the llvm-commits
mailing list