diff options
author | Jeff Law <jlaw@ventanamicro.com> | 2024-07-15 16:57:44 -0600 |
---|---|---|
committer | Jeff Law <jlaw@ventanamicro.com> | 2024-07-15 17:05:32 -0600 |
commit | 94b21f13763638f64e83e7f9959c7f1523b9eaed (patch) | |
tree | de6bd3b701544bf8890f57d2b119de44687bae27 /gcc/tree-vect-loop.cc | |
parent | 7954bb4fcb6fa80f6bb840133314885011821188 (diff) | |
download | gcc-94b21f13763638f64e83e7f9959c7f1523b9eaed.zip gcc-94b21f13763638f64e83e7f9959c7f1523b9eaed.tar.gz gcc-94b21f13763638f64e83e7f9959c7f1523b9eaed.tar.bz2 |
Fix sign/carry bit handling in ext-dce.
My change to fix a ubsan issue broke handling propagation of the carry/sign bit
down through a right shift. Thanks to Andreas for the analysis and proposed
fix and Sergei for the testcase.
PR rtl-optimization/115876
PR rtl-optimization/115916
gcc/
* ext-dce.cc (carry_backpropagate): Make return type unsigned as well.
Cast to signed for right shift to preserve sign bit.
gcc/testsuite/
* g++.dg/torture/pr115916.C: New test.
Co-author: Andreas Schwab <schwab@linux-m68k.org>
Co-author: Sergei Trofimovich <slyfox at gentoo dot org>
Diffstat (limited to 'gcc/tree-vect-loop.cc')
0 files changed, 0 insertions, 0 deletions