The updates can in theory contain duplicates if the branch has the same
true and false successors. This is not really an issue when used in
SimplifyCFG, because such branches are simplified first. But it could
happen if it is used as a utility.
Details
Details
- Reviewers
spatel RKSimon lebedev.ri
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
I don't think it's possible to have a test case that's just using SimplifyCFG, because the branch would be simplified first. But there should be a crashing one in llvm/test/Transforms/LoopVectorize/AArch64/prepare-hoist-sink.ll from D101290
Comment Actions
Avoid using applyUpdatesPermissive, by directly handling the case with duplicated successors.
llvm/lib/Transforms/Utils/SimplifyCFG.cpp | ||
---|---|---|
1620–1622 | Done! I think we also need handling for the Insert part, because BB1 could also have duplicated successors. |
Comment Actions
There are no plans to use this as utility which could trigger the crash mentioned above. Abandoning for now.
You don't need this to be a vector.