[llvm] [X86][SelectionDAG] Fix the Gather's base and index by modifying the Scale value (PR #134979)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 21 02:20:32 PDT 2025
================
@@ -4930,49 +4874,22 @@ define <16 x float> @test_gather_structpt_16f32_mask_index_offset(ptr %x, ptr %a
; X86-KNL-NEXT: vptestmd %zmm0, %zmm0, %k1
; X86-KNL-NEXT: movl {{[0-9]+}}(%esp), %eax
; X86-KNL-NEXT: movl {{[0-9]+}}(%esp), %ecx
-; X86-KNL-NEXT: vpslld $4, (%ecx), %zmm0
-; X86-KNL-NEXT: vgatherdps 4(%eax,%zmm0), %zmm1 {%k1}
+; X86-KNL-NEXT: vmovdqu64 (%ecx), %zmm0
----------------
RKSimon wrote:
IIRC that was the point of the "empty TODO" in the shift -> scale fold? My prototype transferred one shift bit at a time until we hit the Scale = 8 max. But really we should only attempt the fold if either (a) it will likely allow further simplification or (b) we can transfer the entire min scale amount to scale (NewScale <= 8).
https://github.com/llvm/llvm-project/pull/134979
More information about the llvm-commits
mailing list