]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: re PR rtl-optimization/89721 (__builtin_mffs sometimes optimized away)
authorSegher Boessenkool <segher@kernel.crashing.org>
Thu, 17 Oct 2019 19:52:55 +0000 (21:52 +0200)
committerSegher Boessenkool <segher@gcc.gnu.org>
Thu, 17 Oct 2019 19:52:55 +0000 (21:52 +0200)
Backport from trunk
2019-03-15  Segher Boessenkool  <segher@kernel.crashing.org>

PR rtl-optimization/89721
* lra-constraints (invariant_p): Return false if side_effects_p holds.

From-SVN: r277132

gcc/ChangeLog
gcc/lra-constraints.c

index 94e306e197af84bb1ce0ecb5287882d8b1e196f6..aa4db1c47f2a94d53b69dbd61fe0b5d3645c9a6a 100644 (file)
@@ -1,3 +1,11 @@
+2019-10-17  Segher Boessenkool  <segher@kernel.crashing.org>
+
+       Backport from trunk
+       2019-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
+
+       PR rtl-optimization/89721
+       * lra-constraints (invariant_p): Return false if side_effects_p holds.
+
 2019-10-17  Richard Earnshaw  <rearnsha@arm.com>
 
        Backport from mainline
index 471f878d300e19f8c896ef145f9253e41593f578..629cb4860ace71ca3255a89d2edf770bebe83783 100644 (file)
@@ -5657,6 +5657,9 @@ invariant_p (const_rtx x)
   enum rtx_code code;
   int i, j;
 
+  if (side_effects_p (x))
+    return false;
+
   code = GET_CODE (x);
   mode = GET_MODE (x);
   if (code == SUBREG)