From d6bb7841f25dcd7c5d77c6593005765b66639318 Mon Sep 17 00:00:00 2001 From: Will Schmidt Date: Fri, 12 May 2017 15:17:27 +0000 Subject: [PATCH] rs6000.c (rs6000_gimple_fold_builtin): Add handling for early GIMPLE expansion of vector multiplies. [gcc] 2017-05-12 Will Schmidt * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling for early GIMPLE expansion of vector multiplies. From-SVN: r247974 --- gcc/ChangeLog | 5 +++++ gcc/config/rs6000/rs6000.c | 11 +++++++++++ 2 files changed, 16 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index aa408f1ee75..996770cec52 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-05-12 Will Schmidt + + * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling for + early GIMPLE expansion of vector multiplies. + 2017-05-12 Prakhar Bahuguna * 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 292742aeb60..267659bc520 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: -- 2.30.2