From: Richard Biener Date: Thu, 27 Mar 2025 11:40:15 +0000 (+0100) Subject: target/119010 - add reservations for integer vector compares to zen4/zen5 X-Git-Tag: basepoints/gcc-16~499 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ac62db0915ea468b8d92ab6da105e2e168e06bc;p=thirdparty%2Fgcc.git target/119010 - add reservations for integer vector compares to zen4/zen5 The following handles TI, OI and XI mode in the respective EVEX compare reservations that do not use memory (I've not yet run into ones with). The znver automata has separate reservations for integer compares (but only for zen1, for zen2 and zen3 there are no compare reservations at all), but I don't see why that should be necessary here. PR target/119010 * config/i386/zn4zn5.md (znver4_sse_cmp_avx128, znver5_sse_cmp_avx128): Handle TImode. (znver4_sse_cmp_avx256, znver5_sse_cmp_avx256): Handle OImode. (znver4_sse_cmp_avx512, znver5_sse_cmp_avx512): Handle XImode. --- diff --git a/gcc/config/i386/zn4zn5.md b/gcc/config/i386/zn4zn5.md index 40e51456a46..c7ced5411f0 100644 --- a/gcc/config/i386/zn4zn5.md +++ b/gcc/config/i386/zn4zn5.md @@ -1601,7 +1601,7 @@ (define_insn_reservation "znver4_sse_cmp_avx128" 3 (and (eq_attr "cpu" "znver4") (and (eq_attr "type" "ssecmp") - (and (eq_attr "mode" "V4SF,V2DF,V2SF,V1DF,DF,SF") + (and (eq_attr "mode" "V4SF,V2DF,V2SF,V1DF,DF,SF,TI") (and (eq_attr "prefix" "evex") (eq_attr "memory" "none"))))) "znver4-direct,znver4-fpu0*2|znver4-fpu1*2") @@ -1609,7 +1609,7 @@ (define_insn_reservation "znver5_sse_cmp_avx128" 3 (and (eq_attr "cpu" "znver5") (and (eq_attr "type" "ssecmp") - (and (eq_attr "mode" "V4SF,V2DF,V2SF,V1DF,DF,SF") + (and (eq_attr "mode" "V4SF,V2DF,V2SF,V1DF,DF,SF,TI") (and (eq_attr "prefix" "evex") (eq_attr "memory" "none"))))) "znver4-direct,znver4-fpu1|znver4-fpu2") @@ -1633,7 +1633,7 @@ (define_insn_reservation "znver4_sse_cmp_avx256" 4 (and (eq_attr "cpu" "znver4") (and (eq_attr "type" "ssecmp") - (and (eq_attr "mode" "V8SF,V4DF") + (and (eq_attr "mode" "V8SF,V4DF,OI") (and (eq_attr "prefix" "evex") (eq_attr "memory" "none"))))) "znver4-direct,znver4-fpu0*2|znver4-fpu1*2") @@ -1641,7 +1641,7 @@ (define_insn_reservation "znver5_sse_cmp_avx256" 4 (and (eq_attr "cpu" "znver5") (and (eq_attr "type" "ssecmp") - (and (eq_attr "mode" "V8SF,V4DF") + (and (eq_attr "mode" "V8SF,V4DF,OI") (and (eq_attr "prefix" "evex") (eq_attr "memory" "none"))))) "znver4-direct,znver4-fpu1|znver4-fpu2") @@ -1665,7 +1665,7 @@ (define_insn_reservation "znver4_sse_cmp_avx512" 5 (and (eq_attr "cpu" "znver4") (and (eq_attr "type" "ssecmp") - (and (eq_attr "mode" "V16SF,V8DF") + (and (eq_attr "mode" "V16SF,V8DF,XI") (and (eq_attr "prefix" "evex") (eq_attr "memory" "none"))))) "znver4-direct,znver4-fpu0*2|znver4-fpu1*2") @@ -1673,7 +1673,7 @@ (define_insn_reservation "znver5_sse_cmp_avx512" 5 (and (eq_attr "cpu" "znver5") (and (eq_attr "type" "ssecmp") - (and (eq_attr "mode" "V16SF,V8DF") + (and (eq_attr "mode" "V16SF,V8DF,XI") (and (eq_attr "prefix" "evex") (eq_attr "memory" "none"))))) "znver4-direct,znver4-fpu1|znver4-fpu2")