[llvm] [VPlan] Use InstSimplifyFolder in IRBuilder (PR #141225)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Sat May 24 05:32:04 PDT 2025


https://github.com/fhahn commented:

I am not sure if using InstSimplifyFolder is feasible, as during codegen the IR is in an incomplete state (phis may not have their incoming values set, branch destination may not be set, blocks with unreachable terminators). This is probably the reason for incorrect folds, as InstSimplify tries to derive information from incomplete IR and reaches incorrect conclusions.

Doing folds at code-gen time not done intentionally at the moment, as it means we dont correctly consider them during cost modeling and VPlan execution should be as simple as possible (not complete yet but working towards that)



https://github.com/llvm/llvm-project/pull/141225


More information about the llvm-commits mailing list