* [PATCH i386 AVX512] [80/n] Extend expand_sse2_mulvxdi3.
@ 2014-10-16 12:01 Kirill Yukhin
2014-10-16 12:34 ` Uros Bizjak
0 siblings, 1 reply; 6+ messages in thread
From: Kirill Yukhin @ 2014-10-16 12:01 UTC (permalink / raw)
To: Uros Bizjak; +Cc: Jakub Jelinek, Richard Henderson, GCC Patches, kirill.yukhin
Hello,
This patch extends expand_sse2_mulvxdi3.
Bootstrapped.
AVX-512* tests on top of patch-set all pass
under simulator.
Is it ok for trunk?
gcc/
* config/i386/i386.c (ix86_expand_sse2_mulvxdi3): Extend
expand_sse2_mulvxdi3.
--
Thanks, K
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 1ee947a..945bc8d 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -45667,7 +45667,19 @@ ix86_expand_sse2_mulvxdi3 (rtx op0, rtx op1, rtx op2)
enum machine_mode mode = GET_MODE (op0);
rtx t1, t2, t3, t4, t5, t6;
- if (TARGET_XOP && mode == V2DImode)
+ if (TARGET_AVX512DQ)
+ {
+ if (mode == V8DImode)
+ emit_insn (gen_avx512dq_mulv8di3 (op0, op1, op2));
+ else if (TARGET_AVX512VL)
+ {
+ if (mode == V4DImode)
+ emit_insn (gen_avx512dq_mulv4di3 (op0, op1, op2));
+ else if (mode == V2DImode)
+ emit_insn (gen_avx512dq_mulv4di3 (op0, op1, op2));
+ }
+ }
+ else if (TARGET_XOP && mode == V2DImode)
{
/* op1: A,B,C,D, op2: E,F,G,H */
op1 = gen_lowpart (V4SImode, op1);
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH i386 AVX512] [80/n] Extend expand_sse2_mulvxdi3.
2014-10-16 12:01 [PATCH i386 AVX512] [80/n] Extend expand_sse2_mulvxdi3 Kirill Yukhin
@ 2014-10-16 12:34 ` Uros Bizjak
2014-10-17 12:34 ` Kirill Yukhin
0 siblings, 1 reply; 6+ messages in thread
From: Uros Bizjak @ 2014-10-16 12:34 UTC (permalink / raw)
To: Kirill Yukhin; +Cc: Jakub Jelinek, Richard Henderson, GCC Patches
On Thu, Oct 16, 2014 at 1:55 PM, Kirill Yukhin <kirill.yukhin@gmail.com> wrote:
> Hello,
> This patch extends expand_sse2_mulvxdi3.
>
> Bootstrapped.
> AVX-512* tests on top of patch-set all pass
> under simulator.
>
> Is it ok for trunk?
>
> gcc/
> * config/i386/i386.c (ix86_expand_sse2_mulvxdi3): Extend
> expand_sse2_mulvxdi3.
>
> --
> Thanks, K
>
> diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
> index 1ee947a..945bc8d 100644
> --- a/gcc/config/i386/i386.c
> +++ b/gcc/config/i386/i386.c
> @@ -45667,7 +45667,19 @@ ix86_expand_sse2_mulvxdi3 (rtx op0, rtx op1, rtx op2)
> enum machine_mode mode = GET_MODE (op0);
> rtx t1, t2, t3, t4, t5, t6;
>
> - if (TARGET_XOP && mode == V2DImode)
> + if (TARGET_AVX512DQ)
> + {
> + if (mode == V8DImode)
> + emit_insn (gen_avx512dq_mulv8di3 (op0, op1, op2));
> + else if (TARGET_AVX512VL)
> + {
> + if (mode == V4DImode)
> + emit_insn (gen_avx512dq_mulv4di3 (op0, op1, op2));
> + else if (mode == V2DImode)
> + emit_insn (gen_avx512dq_mulv4di3 (op0, op1, op2));
Should this be v2di ?
> + }
> + }
> + else if (TARGET_XOP && mode == V2DImode)
> {
> /* op1: A,B,C,D, op2: E,F,G,H */
> op1 = gen_lowpart (V4SImode, op1);
Please use function pointers in the added part.
Thanks,
Uros.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH i386 AVX512] [80/n] Extend expand_sse2_mulvxdi3.
2014-10-16 12:34 ` Uros Bizjak
@ 2014-10-17 12:34 ` Kirill Yukhin
2014-10-17 12:45 ` Uros Bizjak
0 siblings, 1 reply; 6+ messages in thread
From: Kirill Yukhin @ 2014-10-17 12:34 UTC (permalink / raw)
To: Uros Bizjak; +Cc: Jakub Jelinek, Richard Henderson, GCC Patches
Hello Uroš,
On 16 Oct 14:29, Uros Bizjak wrote:
> > + if (mode == V4DImode)
> > + emit_insn (gen_avx512dq_mulv4di3 (op0, op1, op2));
> > + else if (mode == V2DImode)
> > + emit_insn (gen_avx512dq_mulv4di3 (op0, op1, op2));
>
> Should this be v2di ?
Right, copy-and-paste :(
>
> > + }
> > + }
> > + else if (TARGET_XOP && mode == V2DImode)
> > {
> > /* op1: A,B,C,D, op2: E,F,G,H */
> > op1 = gen_lowpart (V4SImode, op1);
>
> Please use function pointers in the added part.
Done.
Updated patch in the bottom. Is it ok?
--
Thanks, K
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index c3202c4..415e330 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -45667,7 +45667,22 @@ ix86_expand_sse2_mulvxdi3 (rtx op0, rtx op1, rtx op2)
enum machine_mode mode = GET_MODE (op0);
rtx t1, t2, t3, t4, t5, t6;
- if (TARGET_XOP && mode == V2DImode)
+ if (TARGET_AVX512DQ)
+ {
+ rtx (*gen) (rtx, rtx, rtx);
+
+ if (mode == V8DImode)
+ gen = gen_avx512dq_mulv8di3;
+ else if (TARGET_AVX512VL)
+ {
+ if (mode == V4DImode)
+ gen = gen_avx512dq_mulv4di3;
+ else if (mode == V2DImode)
+ gen = gen_avx512dq_mulv2di3;
+ }
+ emit_insn (gen (op0, op1, op2));
+ }
+ else if (TARGET_XOP && mode == V2DImode)
{
/* op1: A,B,C,D, op2: E,F,G,H */
op1 = gen_lowpart (V4SImode, op1);
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH i386 AVX512] [80/n] Extend expand_sse2_mulvxdi3.
2014-10-17 12:34 ` Kirill Yukhin
@ 2014-10-17 12:45 ` Uros Bizjak
2014-10-17 14:27 ` [PATCH i386 AVX512 Boostrap] " Kirill Yukhin
0 siblings, 1 reply; 6+ messages in thread
From: Uros Bizjak @ 2014-10-17 12:45 UTC (permalink / raw)
To: Kirill Yukhin; +Cc: Jakub Jelinek, Richard Henderson, GCC Patches
On Fri, Oct 17, 2014 at 2:32 PM, Kirill Yukhin <kirill.yukhin@gmail.com> wrote:
> Hello Uroš,
> On 16 Oct 14:29, Uros Bizjak wrote:
>> > + if (mode == V4DImode)
>> > + emit_insn (gen_avx512dq_mulv4di3 (op0, op1, op2));
>> > + else if (mode == V2DImode)
>> > + emit_insn (gen_avx512dq_mulv4di3 (op0, op1, op2));
>>
>> Should this be v2di ?
> Right, copy-and-paste :(
>>
>> > + }
>> > + }
>> > + else if (TARGET_XOP && mode == V2DImode)
>> > {
>> > /* op1: A,B,C,D, op2: E,F,G,H */
>> > op1 = gen_lowpart (V4SImode, op1);
>>
>> Please use function pointers in the added part.
> Done.
>
> Updated patch in the bottom. Is it ok?
OK.
Thanks,
Uros.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH i386 AVX512 Boostrap] [80/n] Extend expand_sse2_mulvxdi3.
2014-10-17 12:45 ` Uros Bizjak
@ 2014-10-17 14:27 ` Kirill Yukhin
2014-10-17 14:30 ` Uros Bizjak
0 siblings, 1 reply; 6+ messages in thread
From: Kirill Yukhin @ 2014-10-17 14:27 UTC (permalink / raw)
To: Uros Bizjak; +Cc: Jakub Jelinek, Richard Henderson, GCC Patches
Hello,
This is fix for bootstrap failure.
Is it OK?
gcc/
* config/i386/i386.c (ix86_expand_sse2_mulvxdi3): Refactor
conditions to fix bootstrap.
--
Thanks, K
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 7040200..3ddaf3d 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -45671,21 +45671,12 @@ ix86_expand_sse2_mulvxdi3 (rtx op0, rtx op1, rtx op2)
enum machine_mode mode = GET_MODE (op0);
rtx t1, t2, t3, t4, t5, t6;
- if (TARGET_AVX512DQ)
- {
- rtx (*gen) (rtx, rtx, rtx);
-
- if (mode == V8DImode)
- gen = gen_avx512dq_mulv8di3;
- else if (TARGET_AVX512VL)
- {
- if (mode == V4DImode)
- gen = gen_avx512dq_mulv4di3;
- else if (mode == V2DImode)
- gen = gen_avx512dq_mulv2di3;
- }
- emit_insn (gen (op0, op1, op2));
- }
+ if (TARGET_AVX512DQ && mode == V8DImode)
+ emit_insn (gen_avx512dq_mulv8di3 (op0, op1, op2));
+ else if (TARGET_AVX512DQ && TARGET_AVX512VL && mode == V4DImode)
+ emit_insn (gen_avx512dq_mulv4di3 (op0, op1, op2));
+ else if (TARGET_AVX512DQ && TARGET_AVX512VL && mode == V2DImode)
+ emit_insn (gen_avx512dq_mulv2di3 (op0, op1, op2));
else if (TARGET_XOP && mode == V2DImode)
{
/* op1: A,B,C,D, op2: E,F,G,H */
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH i386 AVX512 Boostrap] [80/n] Extend expand_sse2_mulvxdi3.
2014-10-17 14:27 ` [PATCH i386 AVX512 Boostrap] " Kirill Yukhin
@ 2014-10-17 14:30 ` Uros Bizjak
0 siblings, 0 replies; 6+ messages in thread
From: Uros Bizjak @ 2014-10-17 14:30 UTC (permalink / raw)
To: Kirill Yukhin; +Cc: Jakub Jelinek, Richard Henderson, GCC Patches
On Fri, Oct 17, 2014 at 4:25 PM, Kirill Yukhin <kirill.yukhin@gmail.com> wrote:
> Hello,
> This is fix for bootstrap failure.
>
> Is it OK?
>
> gcc/
> * config/i386/i386.c (ix86_expand_sse2_mulvxdi3): Refactor
> conditions to fix bootstrap.
Well, OK.
Uros.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-10-17 14:27 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-16 12:01 [PATCH i386 AVX512] [80/n] Extend expand_sse2_mulvxdi3 Kirill Yukhin
2014-10-16 12:34 ` Uros Bizjak
2014-10-17 12:34 ` Kirill Yukhin
2014-10-17 12:45 ` Uros Bizjak
2014-10-17 14:27 ` [PATCH i386 AVX512 Boostrap] " Kirill Yukhin
2014-10-17 14:30 ` Uros Bizjak
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).