[llvm] [AArch64] Ensure we transferImpOps on BSP pseudo expansions. (PR #149456)

Ricardo Jesus via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 18 01:29:14 PDT 2025


https://github.com/rj-jesus commented:

I think this change looks good, but the original input from #149380 looks suspicious (unless I'm missing something).

What I mean is this (https://godbolt.org/z/j15MoWf9E):
```
    ...
    renamable $q16_q17_q18_q19 = LD1Fourv2d $x21 :: (load (s512) from %stack.8, align 16)
    renamable $q17 = BSPv16i8 killed renamable $q0, renamable $q1, renamable $q23, implicit killed $q16_q17_q18_q19, implicit-def $q16_q17_q18_q19
    ST1Fourv2d killed renamable $q16_q17_q18_q19, killed $x21 :: (store (s512) into %stack.8, align 16)
    $q27 = ORRv16i8 $q20, $q20
    renamable $q0 = CMHIv2i64 renamable $q1, $q20
    renamable $q9 = BSPv16i8 killed renamable $q0, renamable $q1, $q20, implicit killed $q1_q2_q3, implicit killed $q8_q9_q10_q11, implicit-def $q8_q9_q10_q11
    $x21 = ADDXri $sp, 976, 0
    ST1Fourv2d killed renamable $q8_q9_q10_q11, killed $x21 :: (store (s512) into %stack.23, align 16)
    renamable $x21 = ADDXri renamable $x19, 144, 0
    renamable $q0 = CMHIv2i64 renamable $q4, renamable $q21
    renamable $q1_q2_q3 = LD3Threev2d killed renamable $x21 :: (load (s384) from %ir.35, align 64)
    renamable $q7 = CMHIv2i64 renamable $q1, renamable $q21
    renamable $q16 = BSPv16i8 killed renamable $q0, renamable $q4, renamable $q21, implicit-def $q16_q17_q18_q19
    renamable $q19 = BSPv16i8 killed renamable $q7, renamable $q1, renamable $q21, implicit killed $q16_q17_q18_q19, implicit-def $q16_q17_q18_q19
    $q12 = ORRv16i8 $q16, killed $q16
    $q13 = ORRv16i8 $q17, killed $q17
    $q14 = ORRv16i8 $q18, killed $q18
    $q15 = ORRv16i8 $q19, killed $q19
    ...
```

The first store seems to kill `$q16_q17_q18_q19` before we actually reach the later instructions using `q16`, `q18` and `q19`. Are they expected to be live then?

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


More information about the llvm-commits mailing list