[PATCH] D77560: [SCEV] don't try to query getSCEV() for incomplete PHIs
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 29 05:06:31 PDT 2020
lebedev.ri added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp:1190
+ // PHI has no meaning at all.
+ if (!PN.getParent()->hasNPredecessors(PN.getNumIncomingValues()))
+ continue;
----------------
I don't think this is correct fix. It is perfectly legal to have e.g. the following:
```
pred:
<...>
br label %succ
succ:
%10 = phi i32 [ 0, %pred ], [ 0, %pred ]
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77560/new/
https://reviews.llvm.org/D77560
More information about the llvm-commits
mailing list