aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Schmidt <will_schmidt@vnet.ibm.com>2017-05-12 15:17:27 +0000
committerWill Schmidt <willschm@gcc.gnu.org>2017-05-12 15:17:27 +0000
commitd6bb7841f25dcd7c5d77c6593005765b66639318 (patch)
tree68557dae0711e2aabd17c360fded7aca53361760
parentf859f912e4df1a6dad3ab6f61e8b8ce0dd77e16d (diff)
downloadgcc-d6bb7841f25dcd7c5d77c6593005765b66639318.zip
gcc-d6bb7841f25dcd7c5d77c6593005765b66639318.tar.gz
gcc-d6bb7841f25dcd7c5d77c6593005765b66639318.tar.bz2
rs6000.c (rs6000_gimple_fold_builtin): Add handling for early GIMPLE expansion of vector multiplies.
[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
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/rs6000/rs6000.c11
2 files changed, 16 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index aa408f1..996770c 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 292742a..267659b 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -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: