[llvm] [AArch64] Optimize vector multiplications by certain constants for v2i64 (PR #183827)

Aly ElAshram via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 7 10:05:41 PST 2026


AlyElashram wrote:

After a little bit of more research , i don't think it's worth implementing the override. 

The tradeoff is :
1. `decomposeMulByConstant` approach: Override the hook to return true for v2i64. 
Zero new decomposition code needed as the DAGcombiner does it all. But it runs during DAGCombine (before legalization), so it would fire before LowerMUL and selectUmullSmull, destroying SMULL-eligible patterns.

2. `LowerMUL` approach : We duplicate the decomposition logic, but it runs after SMULL/UMULL has been tried. No risk of interfering with widening multiplies.

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


More information about the llvm-commits mailing list