[llvm] [AArch64][DAGcombine] Combine (zext i8 * 0x010101...) to NEON dup (PR #194246)

Paul Walker via llvm-commits llvm-commits at lists.llvm.org
Fri May 1 09:54:53 PDT 2026


https://github.com/paulwalker-arm commented:

Am I correct in suggesting the combine is only valuable for the case when memory is involved?  I suspect something simple like:
```
define i32 @broadcast_byte_to_4bytes_no_mem(i8 %val) {
  %ext = zext i8 %val to i32                                                        
  %broadcast = mul i32 %ext, 16843009  ; 0x01010101                                 
  ret i32 %broadcast                                                                
}  
```
is now going result is significantly slower code? Also, for newer cores integer mul isn't all that bad anyway so are you sure there's value here? Is this something you're seeing in real code?

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


More information about the llvm-commits mailing list