[PATCH] D75408: [ConstantFolding] Make sure GEPs are fully folded

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 1 02:16:00 PST 2020


nikic added a comment.

I encountered some more cases where we can end up with not fully folded constants, in particular folding of load instructions will apparently not fold values loaded from aggregates. Looking through the code, the same probably happens when phis are folded. As such, it may not make sense to try and address this in individual places, and we should instead automatically perform another constant fold if constant folding succeeded. Alternatively we could say that constant folding doesn't have to be complete in the first place (which was my assumption) and the consumer should rerun it multiple times instead (which seems pretty odd to me).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D75408





More information about the llvm-commits mailing list