Revert "[InstCombine] Take 2: Perform trivial PHI CSE"
authorRoman Lebedev <lebedev.ri@gmail.com>
Sat, 29 Aug 2020 13:00:07 +0000 (16:00 +0300)
committerRoman Lebedev <lebedev.ri@gmail.com>
Sat, 29 Aug 2020 13:05:02 +0000 (16:05 +0300)
commitbdaa3f86a040b138c58de41d73d35b76fdec1380
tree638227da6568d90fd7bb28950935a8865055eb6b
parent6093b14c2c1fc785bfb7040ecebfe4127e1ab9ab
Revert "[InstCombine] Take 2: Perform trivial PHI CSE"

While the original variant with doing this in InstSimplify (rightfully)
caused questions and ultimately was detected to be a culprit
of stage2-stage3 mismatch, it was expected that
InstCombine-based implementation would be fine.

But apparently it's not, as
http://lab.llvm.org:8011/builders/clang-with-thin-lto-ubuntu/builds/24095/steps/compare-compilers/logs/stdio
suggests.

Which suggests that somewhere in InstCombine there is a loop
over nondeterministically sorted container, which causes
different worklist ordering.

This reverts commit 3e69871ab5a66fb55913a2a2f5e7f5b42899a4c9.
llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp
llvm/test/Transforms/InstCombine/merging-multiple-stores-into-successor.ll
llvm/test/Transforms/InstCombine/phi-aware-aggregate-reconstruction.ll
llvm/test/Transforms/InstCombine/phi-cse.ll
llvm/test/Transforms/InstCombine/phi-equal-incoming-pointers.ll
llvm/test/Transforms/InstCombine/select.ll
llvm/test/Transforms/LoopVectorize/reduction.ll