diff options
author | Takayuki 'January June' Suwa <jjsuwa_sys3175@yahoo.co.jp> | 2024-07-23 16:03:12 +0900 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gmail.com> | 2024-07-29 23:09:22 -0700 |
commit | fb7b82964f54192d0723a45c0657d2eb7c5ac97c (patch) | |
tree | fe7f38b34b688bc3aa486362bbb5615545af9bf2 /gcc/cp/parser.cc | |
parent | 8ebb1d79ea16f37214c33d853061d3c9cf5e7f46 (diff) | |
download | gcc-fb7b82964f54192d0723a45c0657d2eb7c5ac97c.zip gcc-fb7b82964f54192d0723a45c0657d2eb7c5ac97c.tar.gz gcc-fb7b82964f54192d0723a45c0657d2eb7c5ac97c.tar.bz2 |
xtensa: Fix suboptimal loading of pooled constant value into hardware single-precision FP register
We would like to implement the following to store a single-precision FP
constant in a hardware FP register:
- Load the bit-exact integer image of the pooled single-precision FP
constant into an address (integer) register
- Then, assign from that address register to a hardware single-precision
FP register
.literal_position
.literal .LC1, 0x3f800000
...
l32r a9, .LC1
wfr f0, a9
However, it was emitted as follows:
- Load the address of the FP constant entry in litpool into an address
register
- Then, dereference the address via that address register into a hardware
single-precision FP register
.literal_position
.literal .LC1, 0x3f800000
.literal .LC2, .LC1
...
l32r a9, .LC2
lsi f0, a9, 0
It is obviously inefficient to read the pool twice.
gcc/ChangeLog:
* config/xtensa/xtensa.md (movsf_internal):
Reorder alternative that corresponds to L32R machine instruction,
and prefix alternatives that correspond to LSI/SSI instructions
with the constraint character '^' so that they are disparaged by
reload/LRA.
Diffstat (limited to 'gcc/cp/parser.cc')
0 files changed, 0 insertions, 0 deletions