[all-commits] [llvm/llvm-project] 228cc2: [IROutliner] Ensure merged PHINodes respect order ...
Andrew Litteken via All-commits
all-commits at lists.llvm.org
Mon Mar 14 14:48:38 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 228cc2c38bfb9d703c33561dd88ce1b9e16601ce
https://github.com/llvm/llvm-project/commit/228cc2c38bfb9d703c33561dd88ce1b9e16601ce
Author: Andrew Litteken <andrew.litteken at gmail.com>
Date: 2022-03-14 (Mon, 14 Mar 2022)
Changed paths:
M llvm/include/llvm/Transforms/IPO/IROutliner.h
M llvm/lib/Transforms/IPO/IROutliner.cpp
A llvm/test/Transforms/IROutliner/different-order-phi-merges.ll
Log Message:
-----------
[IROutliner] Ensure merged PHINodes respect order and incoming blocks, not just incoming values
When matching PHINodes when margining functions the IROutliner only checks that an incoming value exists in phi node in overall function. It doesn't check the length, the order, or that the incoming block also matches. In the given example, we see that both phi nodes have the same incoming values, but from different blocks.
The fix is to to enforce stricter a match of the incoming value, and the incoming block as well when matching the created phi nodes.
Reviewers: paquette
Differential Revision: https://reviews.llvm.org/D121310
More information about the All-commits
mailing list