re PR middle-end/86380 (incorrect comparison in function choose_multiplier)

PR middle-end/86380
	* expmed.c (choose_multiplier): Fix incorrect comparison with mask.

From-SVN: r262401
This commit is contained in:
Eric Botcazou 2018-07-04 12:56:48 +00:00 committed by Eric Botcazou
parent aacd59e751
commit 04f8c98c51
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
PR middle-end/86380
* expmed.c (choose_multiplier): Fix incorrect comparison with mask.
2018-07-04 Aldy Hernandez <aldyh@redhat.com>
* tree-vrp.c (extract_range_from_binary_expr_1): Initialize

View File

@ -3678,7 +3678,7 @@ choose_multiplier (unsigned HOST_WIDE_INT d, int n, int precision,
{
unsigned HOST_WIDE_INT mask = (HOST_WIDE_INT_1U << n) - 1;
*multiplier_ptr = mhigh.to_uhwi () & mask;
return mhigh.to_uhwi () >= mask;
return mhigh.to_uhwi () > mask;
}
else
{