[PATCH] D110055: [AsmPrinter] Loop over bundles in generic code

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 24 07:23:50 PDT 2021


foad added a comment.

> Mips has a test change for some debug data. I hope this is just some
> moved metadata and doesn't change behavior.

Unfortunately I think you have broken the delay slot stuff that was added in D78107 <https://reviews.llvm.org/D78107>, which was meant to ensure that the "label after a call follows the delay slot instruction". The diff from your change on the mips test case looks like this:

   	jal	f1
  -	addiu	$4, $zero, 10
   $tmp2:
  +	addiu	$4, $zero, 10

so the label $tmp2 now points to the addiu which is in the delay slot of the jal (call).

It looks like D78107 <https://reviews.llvm.org/D78107> relies on some dubious bundle-without-a-BUNDLE-insn constrructs like this:

  JAL @f1, <regmask $fp $ra $d10 $d11 $d12 $d13 $d14 $d15 $f20 $f21 $f22 $f23 $f24 $f25 $f26 $f27 $f28 $f29 $f30 $f31 $s0 $s1 $s2 $s3 $s4 $s5 $s6 $s7>, implicit-def dead $ra, implicit killed $a0, implicit-def $sp, debug-location !17; m.c:0 {
    $a0 = ADDiu $zero, 10, debug-location !17; m.c:0
  }

so maybe you just need to be careful to handle these correctly?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110055/new/

https://reviews.llvm.org/D110055



More information about the llvm-commits mailing list