[PATCH] D121313: [IROutliner] Fix miscounting of exit paths when a single phi node used as an output for several outlined regions.
Andrew Litteken via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 9 11:00:16 PST 2022
AndrewLitteken created this revision.
AndrewLitteken added a reviewer: paquette.
Herald added subscribers: ormris, hiraditya.
Herald added a project: All.
AndrewLitteken requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Reproduced: https://godbolt.org/z/j9sK47KM7
The IR Outliner is supposed to extract the outputs contained in an external phi node and place them into a phi node contained within the outlined function. However, when the output values of two outlined functions with two different output sets are contained within the same phi node, they are counted as the same exit path when first analyzed. In reality, these create two different phi nodes, creating an inconsistency, resulting in a mismatch in the expected number of output paths and a crash.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D121313
Files:
llvm/lib/Transforms/IPO/IROutliner.cpp
llvm/test/Transforms/IROutliner/exit-block-phi-node-value-attribution.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D121313.414158.patch
Type: text/x-patch
Size: 7244 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220309/5a9f411a/attachment.bin>
More information about the llvm-commits
mailing list