On Tue, 2025-11-18 at 10:47 -0600, Segher Boessenkool wrote: > On Tue, Nov 18, 2025 at 04:00:35PM +0530, Avinash Jayakar wrote: > > Hi, > > > > This is a small patch to fix PR119130. Bootstrapped and regtested > > on both > > powerpc64 little and big endian targets. Ok for trunk? > > Okay for trunk. Thanks! > > Do you want backports? > Thanks for the quick review! This issue was introduced with the commit 58b475a2233630b1737bbdab986f08510d62cd3a, which I can see from release 11. It would be good to backport I think. Please do let me know in case I need to backport for all affected release branches.
Regards, Avinash Jayakar > > Segher > > > > The patterns for altivec_vpku<VI_char>um take care of the order of > > operands for the vpkuwum instruction, and therefore it is not > > needed in > > the define_expand pattern "convert_4f32_8f16". > > > > 2025-11-18 Avinash Jayakar <[email protected]> > > > > gcc/ChangeLog: > > PR target/119130 > > * config/rs6000/altivec.md (convert_4f32_8f16): Use same > > operand > > order for both endian format. > > > > gcc/testsuite/ChangeLog: > > PR target/119130 > > * gcc.target/powerpc/builtins-1-p9-runnable.c: Use same > > expected > > results for both endian format. > > --- > > gcc/config/rs6000/altivec.md | 5 +--- > > - > > gcc/testsuite/gcc.target/powerpc/builtins-1-p9-runnable.c | 5 ---- > > - > > 2 files changed, 1 insertion(+), 9 deletions(-) > > > > diff --git a/gcc/config/rs6000/altivec.md > > b/gcc/config/rs6000/altivec.md > > index fa3368079ad..3336b0c75dd 100644 > > --- a/gcc/config/rs6000/altivec.md > > +++ b/gcc/config/rs6000/altivec.md > > @@ -3625,10 +3625,7 @@ > > > > emit_insn (gen_vsx_xvcvsphp (rtx_tmp_hi, operands[1])); > > emit_insn (gen_vsx_xvcvsphp (rtx_tmp_lo, operands[2])); > > - if (!BYTES_BIG_ENDIAN) > > - emit_insn (gen_altivec_vpkuwum (operands[0], rtx_tmp_hi, > > rtx_tmp_lo)); > > - else > > - emit_insn (gen_altivec_vpkuwum (operands[0], rtx_tmp_lo, > > rtx_tmp_hi)); > > + emit_insn (gen_altivec_vpkuwum (operands[0], rtx_tmp_hi, > > rtx_tmp_lo)); > > DONE; > > }) > > > > diff --git a/gcc/testsuite/gcc.target/powerpc/builtins-1-p9- > > runnable.c b/gcc/testsuite/gcc.target/powerpc/builtins-1-p9- > > runnable.c > > index 976654155b1..500db87d7e0 100644 > > --- a/gcc/testsuite/gcc.target/powerpc/builtins-1-p9-runnable.c > > +++ b/gcc/testsuite/gcc.target/powerpc/builtins-1-p9-runnable.c > > @@ -16,13 +16,8 @@ int main() { > > vfb = (vector float){10.0, -2.0, 70.0, 999.0 }; > > > > /* Expected results. */ > > -#ifdef __BIG_ENDIAN__ > > - vexpected = (vector unsigned short) { 0x4900, 0xc000, 0x5460, > > 0x63ce, > > - 0x3666, 0x3e66, 0x4d00, > > 0x563e }; > > -#else > > vexpected = (vector unsigned short) { 0x3666, 0x3e66, 0x4d00, > > 0x563e, > > 0x4900, 0xc000, 0x5460, > > 0x63ce }; > > -#endif > > > > /* > > vresult = vec_pack_to_short_fp32 (vfa, vfb); > > -- > > 2.51.0
