sse.md (andnot<mode>3): Add FALLTHRU comments.

* config/i386/sse.md (andnot<mode>3): Add FALLTHRU comments.
	Introduce ssesuffix variable.
	(<mask_codefor><code><mode>3<mask_name>): Ditto.
	(*<code><mode>3): Ditto.

From-SVN: r240834
This commit is contained in:
Uros Bizjak 2016-10-06 16:56:34 +02:00 committed by Uros Bizjak
parent c6a2617973
commit 271319ae2b
2 changed files with 39 additions and 23 deletions

View File

@ -1,3 +1,10 @@
2016-10-06 Uros Bizjak <ubizjak@gmail.com>
* config/i386/sse.md (andnot<mode>3): Add FALLTHRU comments.
Introduce ssesuffix variable.
(<mask_codefor><code><mode>3<mask_name>): Ditto.
(*<code><mode>3): Ditto.
2016-10-06 Jan Hubicka <hubicka@ucw.cz>
* postreload.c (reload_cse_simplify): Skip also USE when detecting

View File

@ -11263,46 +11263,52 @@
static char buf[64];
const char *ops;
const char *tmp;
const char *ssesuffix;
switch (get_attr_mode (insn))
{
case MODE_XI:
gcc_assert (TARGET_AVX512F);
/* FALLTHRU */
case MODE_OI:
gcc_assert (TARGET_AVX2);
/* FALLTHRU */
case MODE_TI:
gcc_assert (TARGET_SSE2);
tmp = "pandn";
switch (<MODE>mode)
{
case V64QImode:
case V32HImode:
/* There is no vpandnb or vpandnw instruction, nor vpandn for
512-bit vectors. Use vpandnq instead. */
tmp = "pandnq";
ssesuffix = "q";
break;
case V16SImode:
case V8DImode:
tmp = "pandn<ssemodesuffix>";
ssesuffix = "<ssemodesuffix>";
break;
case V8SImode:
case V4DImode:
case V4SImode:
case V2DImode:
tmp = TARGET_AVX512VL ? "pandn<ssemodesuffix>" : "pandn";
ssesuffix = TARGET_AVX512VL ? "<ssemodesuffix>" : "";
break;
default:
tmp = TARGET_AVX512VL ? "pandnq" : "pandn";
break;
ssesuffix = TARGET_AVX512VL ? "q" : "";
}
break;
case MODE_V16SF:
gcc_assert (TARGET_AVX512F);
/* FALLTHRU */
case MODE_V8SF:
gcc_assert (TARGET_AVX);
/* FALLTHRU */
case MODE_V4SF:
gcc_assert (TARGET_SSE);
tmp = "andnps";
tmp = "andn";
ssesuffix = "ps";
break;
default:
@ -11312,16 +11318,16 @@
switch (which_alternative)
{
case 0:
ops = "%s\t{%%2, %%0|%%0, %%2}";
ops = "%s%s\t{%%2, %%0|%%0, %%2}";
break;
case 1:
ops = "v%s\t{%%2, %%1, %%0|%%0, %%1, %%2}";
ops = "v%s%s\t{%%2, %%1, %%0|%%0, %%1, %%2}";
break;
default:
gcc_unreachable ();
}
snprintf (buf, sizeof (buf), ops, tmp);
snprintf (buf, sizeof (buf), ops, tmp, ssesuffix);
return buf;
}
[(set_attr "isa" "noavx,avx")
@ -11387,6 +11393,7 @@
static char buf[64];
const char *ops;
const char *tmp;
const char *ssesuffix;
switch (get_attr_mode (insn))
{
@ -11398,17 +11405,18 @@
/* FALLTHRU */
case MODE_TI:
gcc_assert (TARGET_SSE2);
tmp = "p<logic>";
switch (<MODE>mode)
{
case V16SImode:
case V8DImode:
tmp = "p<logic><ssemodesuffix>";
ssesuffix = "<ssemodesuffix>";
break;
case V8SImode:
case V4DImode:
case V4SImode:
case V2DImode:
tmp = TARGET_AVX512VL ? "p<logic><ssemodesuffix>" : "p<logic>";
ssesuffix = TARGET_AVX512VL ? "<ssemodesuffix>" : "";
break;
default:
gcc_unreachable ();
@ -11417,9 +11425,11 @@
case MODE_V8SF:
gcc_assert (TARGET_AVX);
/* FALLTHRU */
case MODE_V4SF:
gcc_assert (TARGET_SSE);
tmp = "<logic>ps";
tmp = "<logic>";
ssesuffix = "ps";
break;
default:
@ -11430,18 +11440,18 @@
{
case 0:
if (<mask_applied>)
ops = "v%s\t{%%2, %%0, %%0<mask_operand3_1>|%%0<mask_operand3_1>, %%0, %%2}";
ops = "v%s%s\t{%%2, %%0, %%0<mask_operand3_1>|%%0<mask_operand3_1>, %%0, %%2}";
else
ops = "%s\t{%%2, %%0|%%0, %%2}";
ops = "%s%s\t{%%2, %%0|%%0, %%2}";
break;
case 1:
ops = "v%s\t{%%2, %%1, %%0<mask_operand3_1>|%%0<mask_operand3_1>, %%1, %%2}";
ops = "v%s%s\t{%%2, %%1, %%0<mask_operand3_1>|%%0<mask_operand3_1>, %%1, %%2}";
break;
default:
gcc_unreachable ();
}
snprintf (buf, sizeof (buf), ops, tmp);
snprintf (buf, sizeof (buf), ops, tmp, ssesuffix);
return buf;
}
[(set_attr "isa" "noavx,avx")
@ -11492,18 +11502,17 @@
/* FALLTHRU */
case MODE_TI:
gcc_assert (TARGET_SSE2);
tmp = "p<logic>";
switch (<MODE>mode)
{
case V64QImode:
case V32HImode:
tmp = "p<logic>";
ssesuffix = "q";
break;
case V32QImode:
case V16HImode:
case V16QImode:
case V8HImode:
tmp = "p<logic>";
ssesuffix = TARGET_AVX512VL ? "q" : "";
break;
default:
@ -11513,10 +11522,11 @@
case MODE_V8SF:
gcc_assert (TARGET_AVX);
/* FALLTHRU */
case MODE_V4SF:
gcc_assert (TARGET_SSE);
tmp = "<logic>ps";
ssesuffix = "";
tmp = "<logic>";
ssesuffix = "ps";
break;
default:
@ -11526,17 +11536,16 @@
switch (which_alternative)
{
case 0:
ops = "%s\t{%%2, %%0|%%0, %%2}";
snprintf (buf, sizeof (buf), ops, tmp);
ops = "%s%s\t{%%2, %%0|%%0, %%2}";
break;
case 1:
ops = "v%s%s\t{%%2, %%1, %%0|%%0, %%1, %%2}";
snprintf (buf, sizeof (buf), ops, tmp, ssesuffix);
break;
default:
gcc_unreachable ();
}
snprintf (buf, sizeof (buf), ops, tmp, ssesuffix);
return buf;
}
[(set_attr "isa" "noavx,avx")