Re: [PATCH] aarch64: Fix wrong code for bfloat when f16 is enabled [PR 111867]

2023-12-11 Thread Richard Sandiford
Andrew Pinski writes: > The problem here is when f16 is enabled, movbf_aarch64 accepts `Ufc` > as a constraint: > [ w, Ufc ; fconsts , fp16 ] fmov\t%h0, %1 > But that is for fmov values and in this case fmov represents f16 rather than > bfloat16 values. > This means we would get

[PATCH] aarch64: Fix wrong code for bfloat when f16 is enabled [PR 111867]

2023-12-10 Thread Andrew Pinski
The problem here is when f16 is enabled, movbf_aarch64 accepts `Ufc` as a constraint: [ w, Ufc ; fconsts , fp16 ] fmov\t%h0, %1 But that is for fmov values and in this case fmov represents f16 rather than bfloat16 values. This means we would get the wrong value in the register.