diff options
author | Andrew MacLeod <amacleod@redhat.com> | 2022-08-22 15:40:48 -0400 |
---|---|---|
committer | Andrew MacLeod <amacleod@redhat.com> | 2022-08-22 21:04:44 -0400 |
commit | de6d9e0b3d5c08896cbf047b299fc7f8d1e42be7 (patch) | |
tree | 00da3a5299ca384e2b3a810868cc26c009ffece8 /gcc/reload.h | |
parent | 3b2e3fa39dd2b606566f47006d015f9c447dcc7d (diff) | |
download | gcc-de6d9e0b3d5c08896cbf047b299fc7f8d1e42be7.zip gcc-de6d9e0b3d5c08896cbf047b299fc7f8d1e42be7.tar.gz gcc-de6d9e0b3d5c08896cbf047b299fc7f8d1e42be7.tar.bz2 |
Return the correct relation
With an input condition of op1 > op2, and evaluating the unsigned expression:
LHS = op1 - op2
range-ops was returning LHS < op1 , which is incorrect as op2 coould be
zero. This patch adjusts it to return LHS <= op1.
PR tree-optimization/106687
gcc/
* range-op.cc (operator_minus::lhs_op1_relation): Return VREL_LE
for the VREL_GT case as well.
gcc/testsuite/
* g++.dg/pr106687.C: New.
Diffstat (limited to 'gcc/reload.h')
0 files changed, 0 insertions, 0 deletions