]> gcc.gnu.org Git - gcc.git/commitdiff
re PR middle-end/86380 (incorrect comparison in function choose_multiplier)
authorEric Botcazou <ebotcazou@adacore.com>
Wed, 4 Jul 2018 12:56:48 +0000 (12:56 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Wed, 4 Jul 2018 12:56:48 +0000 (12:56 +0000)
PR middle-end/86380
* expmed.c (choose_multiplier): Fix incorrect comparison with mask.

From-SVN: r262401

gcc/ChangeLog
gcc/expmed.c

index 5ff16010a0ea667200b0f56ca912b50e1622c292..b898915350427866181617ffdac10d79de4bc410 100644 (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
index 4c74e7dc2ea448fb1c1dd69d197b4bca23668b44..b01e1946898a03967929b6ec5b00a1a9061569a2 100644 (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
     {
This page took 0.098051 seconds and 5 git commands to generate.