[PATCH] D144045: [InstCombine] avoid sinking fdiv into a loop

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 14 23:35:35 PST 2023


nikic requested changes to this revision.
nikic added a comment.
This revision now requires changes to proceed.

Before we do this, we should change InstCombine to accept a pass parameter that determines whether LoopInfo is used or not. Currently, we will use it if it happens to be cached, which is very fragile under the new pass manager. I think the particular motivating case will work because InstCombine is preceded by an AlignmentFromAssumption pass, which requires SCEV, which requires LoopInfo, and which preserves CFG. But in other pipeline positions we will randomly either use or not use LoopInfo, depending on whether passes in between happened to make a change or not.

Instead we should specify whether each specific InstCombine invocation should be using LoopInfo or not (probably based on guaranteed availability at that pipeline position).


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144045/new/

https://reviews.llvm.org/D144045



More information about the llvm-commits mailing list