diff options
author | Kewen Lin <linkw@linux.ibm.com> | 2024-07-17 00:14:18 -0500 |
---|---|---|
committer | Kewen Lin <linkw@gcc.gnu.org> | 2024-07-17 00:14:18 -0500 |
commit | 3f6e6d4b408a26f69816f18d88dde4d983677488 (patch) | |
tree | c0299838bf2cfd2191f5dcdd1ff147250f86efb0 /gcc/tree-vectorizer.h | |
parent | f438299ef6860b8233ffe1c5fda7d63f2f6c56ae (diff) | |
download | gcc-3f6e6d4b408a26f69816f18d88dde4d983677488.zip gcc-3f6e6d4b408a26f69816f18d88dde4d983677488.tar.gz gcc-3f6e6d4b408a26f69816f18d88dde4d983677488.tar.bz2 |
expr: Allow same precision modes conversion between {ibm_extended, ieee_quad}_format
With some historical reasons, rs6000 defines KFmode, TFmode
and IFmode to have different mode precisions, but it causes
some issues and needs some workarounds such as PR112993.
So we are going to make all rs6000 128 bit scalar FP modes
have 128 bit precision. Be prepared for that, this patch
is to make function convert_mode_scalar allow same precision
FP modes conversion if their underlying formats are
ibm_extended_format and ieee_quad_format respectively, just
like the existing special treatment on arm_bfloat_half_format
<-> ieee_half_format. It also factors out all the relevant
checks into a lambda function. Besides, similar to ieee fp16
-> bfloat conversion, it adopts trunc_optab rather than
sext_optab for ibm128 to ieee128 conversion.
PR target/112993
gcc/ChangeLog:
* expr.cc (convert_mode_scalar): Allow same precision conversion
between scalar floating point modes if whose underlying format is
ibm_extended_format or ieee_quad_format, and refactor assertion
with new lambda function acceptable_same_precision_modes. Use
trunc_optab rather than sext_optab for ibm128 to ieee128 conversion.
* optabs-libfuncs.cc (gen_trunc_conv_libfunc): Use trunc_optab rather
than sext_optab for ibm128 to ieee128 conversion.
Diffstat (limited to 'gcc/tree-vectorizer.h')
0 files changed, 0 insertions, 0 deletions