* [PATCH, rs6000] Fold vector multiplies in GIMPLE
@ 2017-05-11 15:52 Will Schmidt
2017-05-11 19:15 ` Segher Boessenkool
0 siblings, 1 reply; 2+ messages in thread
From: Will Schmidt @ 2017-05-11 15:52 UTC (permalink / raw)
To: GCC Patches, Segher Boessenkool, David Edelsohn
Cc: Bill Schmidt, Will Schmidt
Hi,
Add support for some of the vector multiply (sp,dp) operations in
the gimple folding. I missed these during an earlier pass that
added the other (mule, mulo) multiply operations. This change is
covered by the existing testcases for vector folding
(gcc.target/powerpc/fold-vec-mul-*.c).
Bootstrapped and tested on powerpc64le-unknown-linux-gnu, and
powerpc-unknown-linux, (p7,p8le,p8be) with no regressions.
Is this OK for trunk?
[gcc]
2017-05-10 Will Schmidt <will_schmidt@vnet.ibm.com>
* config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling for
early GIMPLE expansion of vector multiplies.
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index a1b58e2..c4e03b4 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -16860,6 +16860,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:
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH, rs6000] Fold vector multiplies in GIMPLE
2017-05-11 15:52 [PATCH, rs6000] Fold vector multiplies in GIMPLE Will Schmidt
@ 2017-05-11 19:15 ` Segher Boessenkool
0 siblings, 0 replies; 2+ messages in thread
From: Segher Boessenkool @ 2017-05-11 19:15 UTC (permalink / raw)
To: Will Schmidt; +Cc: GCC Patches, David Edelsohn, Bill Schmidt
Hi!
On Thu, May 11, 2017 at 10:51:54AM -0500, Will Schmidt wrote:
> Add support for some of the vector multiply (sp,dp) operations in
> the gimple folding. I missed these during an earlier pass that
> added the other (mule, mulo) multiply operations. This change is
> covered by the existing testcases for vector folding
> (gcc.target/powerpc/fold-vec-mul-*.c).
>
> Bootstrapped and tested on powerpc64le-unknown-linux-gnu, and
> powerpc-unknown-linux, (p7,p8le,p8be) with no regressions.
>
> Is this OK for trunk?
Sure! Thanks,
Segher
> 2017-05-10 Will Schmidt <will_schmidt@vnet.ibm.com>
>
> * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling for
> early GIMPLE expansion of vector multiplies.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-05-11 18:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-11 15:52 [PATCH, rs6000] Fold vector multiplies in GIMPLE Will Schmidt
2017-05-11 19:15 ` Segher Boessenkool
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).