https://github.com/pcc created https://github.com/llvm/llvm-project/pull/141325
LICM hoists instructions into the preheader, and CSE and GVN can effectively perform a hoist by replacing an instruction with one from another basic block, all of which can lead to the same kinds of pessimizations that isProfitableToHoist() is intended to prevent. Therefore, call the hook from all these passes. This will be tested in the subsequent change that adds a previously hoistable case and verifies that no optimization pass hoists it. _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits