[llvm] [X86] getConstantFromPool - add basic handling for non-zero address offsets (PR #127225)

Phoebe Wang via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 15 03:47:38 PST 2025


================
@@ -242,7 +242,7 @@ define void @load_i32_stride7_vf2(ptr %in.vec, ptr %out.vec0, ptr %out.vec1, ptr
 ; AVX512-FCP-NEXT:    vpmovsxbd {{.*#+}} xmm2 = [13,4,6,7]
 ; AVX512-FCP-NEXT:    vmovdqa 32(%rdi), %ymm7
 ; AVX512-FCP-NEXT:    vpermt2d (%rdi), %ymm2, %ymm7
-; AVX512-FCP-NEXT:    vmovaps {{\.?LCPI[0-9]+_[0-9]+}}+16(%rip), %xmm2
+; AVX512-FCP-NEXT:    vpmovsxbd {{.*#+}} xmm2 = [6,13,6,7]
----------------
phoebewang wrote:

I don't understand the code with the change
```
        if (Fixup.Op && 0 <= ByteOffset &&
            (RegBitWidth + (8 * ByteOffset)) <= CstBitWidth) {
```

IIUC, the `RegBitWidth` here is 128, `ByteOffset` is 16 and `CstBitWidth` is 128. How it meets the condition here?

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


More information about the llvm-commits mailing list