aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.cc
diff options
context:
space:
mode:
authorPan Li <pan2.li@intel.com>2024-01-10 20:57:17 +0800
committerPan Li <pan2.li@intel.com>2024-01-11 18:35:00 +0800
commitb89ef3d40afc4604c279e8802bf279f6e4060f67 (patch)
treefeca67dc26c38d9b1c12eacc84611f829d837b4d /gcc/expr.cc
parent5400778f69d19a94017561c7de02510d9c0899e6 (diff)
downloadgcc-b89ef3d40afc4604c279e8802bf279f6e4060f67.zip
gcc-b89ef3d40afc4604c279e8802bf279f6e4060f67.tar.gz
gcc-b89ef3d40afc4604c279e8802bf279f6e4060f67.tar.bz2
LOOP-UNROLL: Leverage HAS_SIGNED_ZERO for var expansion
The insert_var_expansion_initialization depends on the HONOR_SIGNED_ZEROS to initialize the unrolling variables to +0.0f when -0.0f and no-signed-option. Unfortunately, we should always keep the -0.0f here because: * The -0.0f is always the correct initial value. * We need to support the target that always honor signed zero. Thus, we need to leverage MODE_HAS_SIGNED_ZEROS when initialize instead of HONOR_SIGNED_ZEROS. Then the target/backend can decide to honor the no-signed-zero or not. We also removed the testcase pr30957-1.c, as it makes undefined behavior whether the return value is positive or negative. The below tests are passed for this patch: * The riscv regression tests. * The aarch64 regression tests. * The x86 bootstrap and regression tests. gcc/ChangeLog: * loop-unroll.cc (insert_var_expansion_initialization): Leverage MODE_HAS_SIGNED_ZEROS for expansion variable initialization. gcc/testsuite/ChangeLog: * gcc.dg/pr30957-1.c: Remove. Signed-off-by: Pan Li <pan2.li@intel.com>
Diffstat (limited to 'gcc/expr.cc')
0 files changed, 0 insertions, 0 deletions