[PATCH] D75799: [JumpThreading] Don't create PHI nodes with "is.constant" values

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 8 01:38:46 PST 2020


nikic added a comment.

@void From your example, I still don't really get what the problem is / why this has to be done in JumpThreading in particular. The `%6` phi that gets inserted here looks harmless to me -- the phi is trivial and will get eliminated by any simplification pass later in the pipeline (though I'm not entirely sure why a single-arg phi gets created in the first place).

What you seem to be really doing here is to move the is.constant lowering from the LowerConstantIntrinsics pass into the JumpThreading pass. It sounds to me like some kind of phase ordering issue where LowerConstantIntrinsics runs too late for the necessary DCE to be performed. Is that right? What does the IR look like at the point where the lowering is (currently) performed?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D75799





More information about the llvm-commits mailing list