This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi, This is a subsequent patch to refactor the existing float point vector comparison operator supports. The patch to fix PR92132 supplemented vector float point comparison by exposing the names for unordered/ordered/uneq/ltgt and adding ungt/unge/unlt/unle/ ne. As Segher pointed out, some patterns can be refactored together. The main link on this is: https://gcc.gnu.org/ml/gcc-patches/2019-11/msg00452.html The refactoring mainly follows the below patterns: pattern 1: lt(a,b) = gt(b,a) le(a,b) = ge(b,a) pattern 2: unge(a,b) = ~gt(b,a) unle(a,b) = ~gt(a,b) ne(a,b) = ~eq(a,b) ungt(a,b) = ~ge(b,a) unlt(a,b) = ~ge(a,b) pattern 3: ltgt: gt(a,b) | gt(b,a) ordered: ge(a,b) | ge(b,a) pattern 4: uneq: ~gt(a,b) & ~gt(b,a) unordered: ~ge(a,b) & ~ge(b,a) Naming the code iterators and attributes are really knotty for me :(. Regression testing just launched. BR, Kewen ------------------------------- gcc/ChangeLog 2019-11-11 Kewen Lin <linkw@gcc.gnu.org> * config/rs6000/vector.md (vec_fp_cmp1): New code iterator. (vec_fp_cmp2): Likewise. (vec_fp_cmp3): Likewise. (vec_fp_cmp4): Likewise. (vec_fp_cmp1_attr): New code attribute. (vec_fp_cmp2_attr): Likewise. (vec_fp_cmp3_attr): Likewise. (vec_fp_cmp4_attr): Likewise. (vector_<code><mode> for VEC_F and vec_fp_cmp1): New define_and_split. (vector_<code><mode> for VEC_F and vec_fp_cmp2): Likewise. (vector_<code><mode> for VEC_F and vec_fp_cmp3): Likewise. (vector_<code><mode> for VEC_F and vec_fp_cmp4): Likewise. (vector_lt<mode> for VEC_F): Refactor with vec_fp_cmp1. (vector_le<mode> for VEC_F): Likewise. (vector_unge<mode> for VEC_F): Refactor with vec_fp_cmp2. (vector_unle<mode> for VEC_F): Likewise. (vector_ne<mode> for VEC_F): Likewise. (vector_ungt<mode> for VEC_F): Likewise. (vector_unlt<mode> for VEC_F): Likewise. (vector_ltgt<mode> for VEC_F): Refactor with vec_fp_cmp3. (vector_ordered<mode> for VEC_F): Likewise. (vector_uneq<mode> for VEC_F): Refactor with vec_fp_cmp4. (vector_unordered<mode> for VEC_F): Likewise.
Attachment:
fp_vec_cmp_refactor.diff
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |