https://gcc.gnu.org/g:cb00b3bb514ff8060a057d9e9af83810b85e8e5f
commit cb00b3bb514ff8060a057d9e9af83810b85e8e5f Author: Michael Meissner <[email protected]> Date: Fri Sep 12 17:18:01 2025 -0400 Revert changes Diff: --- gcc/ChangeLog.float | 24 ++---------------------- gcc/config/rs6000/rs6000.md | 7 +++++-- gcc/config/rs6000/vsx.md | 19 ++++++++----------- 3 files changed, 15 insertions(+), 35 deletions(-) diff --git a/gcc/ChangeLog.float b/gcc/ChangeLog.float index 745176d8d44f..30508d34d7d9 100644 --- a/gcc/ChangeLog.float +++ b/gcc/ChangeLog.float @@ -1,25 +1,5 @@ -==================== Branch work221-float, patch #316 ==================== - -Add xxpermdi for bfloat16 converts. - -2025-09-12 Michael Meissner <[email protected]> - -gcc/ - - * config/rs6000/vsx.md (vsx_xvcvdpsp_<mode>): As a hack, add xxpermdi - -==================== Branch work221-float, patch #315 ==================== - -Use xvcvdpsp instead of xscvdpspn. - -2025-09-12 Michael Meissner <[email protected]> - -gcc/ - - * config/rs6000/rs6000.md (trunc<mode>bf2): Use xvcvdpsp instead of - xscvdpspn. - * config/rs6000/vsx.md (vsx_xvcvdpsp_<mode>): New insn. - (vsx_xscvdpspn_sf): Delete. +==================== Branch work221-float, patch #316 was reverted ==================== +==================== Branch work221-float, patch #315 was reverted ==================== ==================== Branch work221-float, patch #314 ==================== diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index 7862ad526f90..4fa59ab54824 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -5920,7 +5920,7 @@ ;; Convert SFmode/DFmode to BFmode. ;; 2 instructions are generated: -;; XVCVDPSPN -- convert SFmode/DFmode scalar to V4SFmode +;; XSCVDPSPN -- convert SFmode/DFmode scalar to V4SFmode ;; XVCVSPBF16 -- convert V4SFmode to even V8BFmode (define_insn_and_split "trunc<mode>bf2" @@ -5940,7 +5940,10 @@ if (GET_CODE (op2) == SCRATCH) op2 = gen_reg_rtx (V4SFmode); - emit_insn (gen_vsx_xvcvdpsp_<mode> (op2, op1)); + emit_insn (GET_MODE (op1) == SFmode + ? gen_vsx_xscvdpspn_sf (op2, op1) + : gen_vsx_xscvdpspn (op2, op1)); + emit_insn (gen_vsx_xvcvspbf16_bf (op0, op2)); DONE; } diff --git a/gcc/config/rs6000/vsx.md b/gcc/config/rs6000/vsx.md index 344f65ea6a77..111457b8fe2e 100644 --- a/gcc/config/rs6000/vsx.md +++ b/gcc/config/rs6000/vsx.md @@ -2436,17 +2436,6 @@ "xvcvdpsp %x0,%x1" [(set_attr "type" "vecdouble")]) -;; Needed for converting SF/DFmode to BFmode -(define_insn "vsx_xvcvdpsp_<mode>" - [(set (match_operand:V4SF 0 "vsx_register_operand" "=wa") - (unspec:V4SF [(match_operand:SFDF 1 "vsx_register_operand" "wa") - (const_int 0)] - UNSPEC_VSX_CVSPDP))] - "VECTOR_UNIT_VSX_P (V2DFmode)" - "xxpermdi %x0,%x1,%x1,0\;xvcvdpsp %x0,%x0" - [(set_attr "type" "fp") - (set_attr "length" "8")]) - ;; xscvspdp, represent the scalar SF type as V4SF (define_insn "vsx_xscvspdp" [(set (match_operand:DF 0 "vsx_register_operand" "=wa") @@ -2522,6 +2511,14 @@ "xscvdpspn %x0,%x1" [(set_attr "type" "fp")]) +(define_insn "vsx_xscvdpspn_sf" + [(set (match_operand:V4SF 0 "vsx_register_operand" "=wa") + (unspec:V4SF [(match_operand:SF 1 "vsx_register_operand" "wa")] + UNSPEC_VSX_CVDPSPN))] + "TARGET_XSCVDPSPN" + "xscvdpspn %x0,%x1" + [(set_attr "type" "fp")]) + (define_insn "vsx_xscvspdpn" [(set (match_operand:DF 0 "vsx_register_operand" "=wa") (unspec:DF [(match_operand:V4SF 1 "vsx_register_operand" "wa")]
