Issue 54211
Summary IR Outliner can mix up order of incoming values when compressing phi nodes if contain the same values
Labels llvm:crash, llvm:optimizations
Assignees AndrewLitteken
Reporter AndrewLitteken
    https://godbolt.org/z/KrKPojnqE

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 will be to enforce stricter a match of the incoming value, and the incoming block as well when matching the created phi nodes.  Patch coming soon.

cc @ornata 
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to