aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-patterns.cc
diff options
context:
space:
mode:
authorKewen Lin <linkw@linux.ibm.com>2023-06-12 01:07:52 -0500
committerKewen Lin <linkw@linux.ibm.com>2023-06-12 01:07:52 -0500
commit388809f2afde874180da0669c669e241037eeba0 (patch)
tree8bb179461f37e086a0441507087eaed3dd20d562 /gcc/tree-vect-patterns.cc
parentb50b9d369c74b7bd86a2b2beb93877f1e6c253ea (diff)
downloadgcc-388809f2afde874180da0669c669e241037eeba0.zip
gcc-388809f2afde874180da0669c669e241037eeba0.tar.gz
gcc-388809f2afde874180da0669c669e241037eeba0.tar.bz2
rs6000: Don't use TFmode for 128 bits fp constant in toc [PR110011]
As PR110011 shows, when encoding 128 bits fp constant into toc, we adopts REAL_VALUE_TO_TARGET_LONG_DOUBLE which is to find the first float mode with LONG_DOUBLE_TYPE_SIZE bits of precision, it would be TFmode here. But the 128 bits fp constant can be with mode IFmode or KFmode, which doesn't necessarily have the same underlying float format as the one of TFmode, like this PR exposes, with option -mabi=ibmlongdouble TFmode has ibm_extended_format while KFmode has ieee_quad_format, mixing up the formats (the encoding/decoding ways) would cause unexpected results. This patch is to make it use constant's own mode instead of TFmode for real_to_target call. PR target/110011 gcc/ChangeLog: * config/rs6000/rs6000.cc (output_toc): Use the mode of the 128-bit floating constant itself for real_to_target call. gcc/testsuite/ChangeLog: * gcc.target/powerpc/pr110011.c: New test.
Diffstat (limited to 'gcc/tree-vect-patterns.cc')
0 files changed, 0 insertions, 0 deletions