From: Richard Earnshaw <[email protected]>
The arm architecture permits BF16 to be implemented without also
implementing support for FP16. In that case the VLDR.16 and VSTR.16
instructions are not implemented and we must use neon lane operations to
load and store values; but these lack indexed offset modes. The result
of this, plus the disparagement of memory to/from GP regs, is that
although we can generate moves to and from core registers, the compiler
may start by simplifying the address into a single base register access;
it's then too late to reconstite the optimal address.
gcc/ChangeLog:
PR target/125744
* config/arm/vfp.md (*mov<mode>_vfp_<mode>16 [HFBF]): Remove
disparagement for r<->m moves.
---
This is a forge pull request published on the gcc-patches mailing list mailing
list
as requested by Richard Earnshaw via Sourceware Forge
<[email protected]>.
Forge discussion: https://forge.sourceware.org/gcc/gcc/pulls/260
Get it locally using:
```
git fetch forge-upstream "+refs/versioned_pull/260/*:refs/versioned_pull/260/*"
git switch -c "pr-260-v1" "refs/versioned_pull/260/1/head"
```
Or, download the patch at: https://forge.sourceware.org/gcc/gcc/pulls/260.diff
Created on: 2026-10-29 15:37:53+00:00
Latest update: 2026-10-29 15:39:32+00:00
Changes: 1 changed files, 2 additions, 2 deletions
Head revision: rearnsha/gcc ref neon-bf16 commit
4ce6739186b669607e00de5c172d4ee0340b36de
Base revision: gcc/gcc ref trunk commit
e33129b871c30276acfaed2b435ae5b505b73655 r17-5743-ge33129b871c302
Merge base: e33129b871c30276acfaed2b435ae5b505b73655
Requested Reviewers: azoff
Changed files:
- M: gcc/config/arm/vfp.md
gcc/config/arm/vfp.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/config/arm/vfp.md b/gcc/config/arm/vfp.md
index 3b353d52f5a9c..b191d3fc87ef5 100644
--- a/gcc/config/arm/vfp.md
+++ b/gcc/config/arm/vfp.md
@@ -483,8 +483,8 @@
)
(define_insn "*mov<mode>_vfp_neon"
- [(set (match_operand:HFBF 0 "nonimmediate_operand" "= t,Um,?r,?m,t,r,t,r,r")
- (match_operand:HFBF 1 "general_operand" " Um, t, m, r,t,r,r,t,F"))]
+ [(set (match_operand:HFBF 0 "nonimmediate_operand" "= t,Um,r,m,t,r,t,r,r")
+ (match_operand:HFBF 1 "general_operand" " Um, t,m,r,t,r,r,t,F"))]
"TARGET_32BIT
&& TARGET_HARD_FLOAT && TARGET_NEON_FP16
&& !TARGET_VFP_FP16INST
--
2.56.0