diff options
author | Segher Boessenkool <segher@kernel.crashing.org> | 2017-04-04 02:10:02 +0200 |
---|---|---|
committer | Segher Boessenkool <segher@gcc.gnu.org> | 2017-04-04 02:10:02 +0200 |
commit | 833bbf60ce6414801d3a381a2a4b1f244bd0d969 (patch) | |
tree | 00a63283331bcb8c6dec0cee8f6b8600a0a657bf /gcc/fold-const.c | |
parent | 5764ee3c8491e3ecff855a319f781a66fca2484e (diff) | |
download | gcc-833bbf60ce6414801d3a381a2a4b1f244bd0d969.zip gcc-833bbf60ce6414801d3a381a2a4b1f244bd0d969.tar.gz gcc-833bbf60ce6414801d3a381a2a4b1f244bd0d969.tar.bz2 |
simplify-rtx: Fix compare of comparisons (PR60818)
The function simplify_binary_operation_1 has code that does
/* Convert (compare (gt (flags) 0) (lt (flags) 0)) to (flags). */
but this transformation is only valid if "flags" has the same machine
mode as the outer compare. This fixes it.
PR rtl-optimization/60818
* simplify-rtx.c (simplify_binary_operation_1): Do not replace
a compare of comparisons with the thing compared if this results
in a different machine mode.
gcc/testsuite/
PR rtl-optimization/60818
* gcc.c-torture/compile/pr60818.c: New testcase.
From-SVN: r246666
Diffstat (limited to 'gcc/fold-const.c')
0 files changed, 0 insertions, 0 deletions