[llvm] [VPlan] Extend cse to eliminate redundant widened loads (PR #212543)

Ashutosh Nema via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 11 02:50:11 PDT 2026


================

----------------
nema-ashutosh wrote:

I prototyped the epoch-based approach as you suggested, storing an epoch alongside each CSEMap entry and eliminating the scan entirely. The implementation works and is a net simplification, since canCSEWithNoAliasCheck disappears completely.

The tradeoff is reduced precision, any write invalidates reuse, so cse_across_noalias_store no longer folds even when the store is proven not to alias. 

My preference is to keep the scan, but I have both patches ready and am happy to switch if you would rather have the simpler state.

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


More information about the llvm-commits mailing list