re PR middle-end/89765 (Multiple problems with vec-insert implementation on PowerPC)
authorRichard Biener <rguenther@suse.de>
Thu, 25 Apr 2019 17:58:56 +0000 (17:58 +0000)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 25 Apr 2019 17:58:56 +0000 (19:58 +0200)
PR middle-end/89765
* gimplify.c (gimplify_expr): Avoid turning a lvalue
VIEW_CONVERT_EXPR into one operating on an rvalue.

From-SVN: r270579

gcc/ChangeLog
gcc/gimplify.c

index 80f974897e7b9ef3a45592fb95f7b4adfc8c29ce..0682a44cd4abfb6375967b517a84911f85562e46 100644 (file)
@@ -1,3 +1,9 @@
+2019-04-25  Richard Biener  <rguenther@suse.de>
+
+       PR middle-end/89765
+       * gimplify.c (gimplify_expr): Avoid turning a lvalue
+       VIEW_CONVERT_EXPR into one operating on an rvalue.
+
 2019-04-25  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR target/89929
index 6ac1b718ebd2f270b38a68bb84693f7fe715256d..e59f38261c3699d88199568c68a4a9ecf0de266e 100644 (file)
@@ -12397,7 +12397,8 @@ gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p,
          break;
 
        case VIEW_CONVERT_EXPR:
-         if (is_gimple_reg_type (TREE_TYPE (*expr_p))
+         if ((fallback & fb_rvalue)
+             && is_gimple_reg_type (TREE_TYPE (*expr_p))
              && is_gimple_reg_type (TREE_TYPE (TREE_OPERAND (*expr_p, 0))))
            {
              ret = gimplify_expr (&TREE_OPERAND (*expr_p, 0), pre_p,