[Bug target/100085] Bad code for union transfer from __float128 to vector types

munroesj at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Feb 25 15:31:54 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100085

--- Comment #21 from Steven Munroe <munroesj at gcc dot gnu.org> ---
Yes I was told by Peter Bergner that the fix from
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100085#c15 had been back ported
top AT15.0-1.

But when ran this test with AT15.0-1 I saw:

0000000000000000 <test_xfer_bin128_2_vui32t_V0>:
   0:   20 00 20 39     li      r9,32
   4:   d0 ff 41 39     addi    r10,r1,-48
   8:   57 12 42 f0     xxswapd vs34,vs34
   c:   99 4f 4a 7c     stxvd2x vs34,r10,r9
  10:   ce 48 4a 7c     lvx     v2,r10,r9
  14:   20 00 80 4e     blr

0000000000000030 <test_xfer_bin128_2_vui64t_V0>:
  30:   20 00 20 39     li      r9,32
  34:   d0 ff 41 39     addi    r10,r1,-48
  38:   57 12 42 f0     xxswapd vs34,vs34
  3c:   99 4f 4a 7c     stxvd2x vs34,r10,r9
  40:   ce 48 4a 7c     lvx     v2,r10,r9
  44:   20 00 80 4e     blr

0000000000000060 <test_xfer_bin128_2_vui128t_V0>:
  60:   20 00 20 39     li      r9,32
  64:   d0 ff 41 39     addi    r10,r1,-48
  68:   57 12 42 f0     xxswapd vs34,vs34
  6c:   99 4f 4a 7c     stxvd2x vs34,r10,r9
  70:   99 4e 4a 7c     lxvd2x  vs34,r10,r9
  74:   57 12 42 f0     xxswapd vs34,vs34
  78:   20 00 80 4e     blr

0000000000000090 <test_xfer_bin128_2_ui128t_V0>:
  90:   57 12 42 f0     xxswapd vs34,vs34
  94:   20 00 40 39     li      r10,32
  98:   d0 ff 01 39     addi    r8,r1,-48
  9c:   f0 ff 21 39     addi    r9,r1,-16
  a0:   99 57 48 7c     stxvd2x vs34,r8,r10
  a4:   00 00 69 e8     ld      r3,0(r9)
  a8:   08 00 89 e8     ld      r4,8(r9)
  ac:   20 00 80 4e     blr

So either the patch for AT15.0-1 is not applied correctly or is non-functional
because of some difference between GCC11/GCC12. Or regressed because of some
other change/patch.

In my experience this part of GCC is fragile (based on the long/sad history of
IBM long double). So this needs to monitored with each new update.


More information about the Gcc-bugs mailing list