[llvm] [GVN] Support rnflow pattern matching and transform (PR #162259)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 27 09:26:16 PDT 2025


nikic wrote:

> The patch is functionally correct as the rnflow application passes. However, compared to trunk this patch **regresses** the app by ~10-12% as the new select instruction the pass is generating is more constly than hoisting the load. I played around `SelectOptimize.cpp` by turning on --disable-loop-level-heuristics. That helps a bit but still ~10% regression persists.

And this is also true with GCC (without vectorization), as IIRC it was doing this transform?

I feel like I saw a comment somewhere that doing the GVN transform would improve performance slightly, but I have trouble finding it, maybe I imagined it...

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


More information about the llvm-commits mailing list