rs6000.c (rs6000_gimple_fold_builtin): Add handling for early GIMPLE expansion of...
authorWill Schmidt <will_schmidt@vnet.ibm.com>
Fri, 12 May 2017 15:17:27 +0000 (15:17 +0000)
committerWill Schmidt <willschm@gcc.gnu.org>
Fri, 12 May 2017 15:17:27 +0000 (15:17 +0000)
[gcc]

2017-05-12  Will Schmidt  <will_schmidt@vnet.ibm.com>

        * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling for
        early GIMPLE expansion of vector multiplies.

From-SVN: r247974

gcc/ChangeLog
gcc/config/rs6000/rs6000.c

index aa408f1ee750b0a7daae3e0fbc2329f5050eae27..996770cec52693c03a8369c46624557b76bcec55 100644 (file)
@@ -1,3 +1,8 @@
+2017-05-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
+
+        * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling for
+        early GIMPLE expansion of vector multiplies.
+
 2017-05-12  Prakhar Bahuguna  <prakhar.bahuguna@arm.com>
 
        * config/arm/arm.md (movsi): Add TARGET_32BIT in addition to the
index 292742aeb6066d9705edb82b48728ddae7a24089..267659bc520dddce09bce134d5a53a2d6cf74429 100644 (file)
@@ -17163,6 +17163,17 @@ rs6000_gimple_fold_builtin (gimple_stmt_iterator *gsi)
        gsi_replace (gsi, g, true);
        return true;
       }
+    case VSX_BUILTIN_XVMULSP:
+    case VSX_BUILTIN_XVMULDP:
+      {
+       arg0 = gimple_call_arg (stmt, 0);
+       arg1 = gimple_call_arg (stmt, 1);
+       lhs = gimple_call_lhs (stmt);
+       gimple *g = gimple_build_assign (lhs, MULT_EXPR, arg0, arg1);
+       gimple_set_location (g, gimple_location (stmt));
+       gsi_replace (gsi, g, true);
+       return true;
+      }
     /* Even element flavors of vec_mul (signed). */
     case ALTIVEC_BUILTIN_VMULESB:
     case ALTIVEC_BUILTIN_VMULESH: