Discussion:
[PATCH i386 AVX512] [76/n] Extend int 2 float conversions.
Kirill Yukhin
2014-10-09 15:01:17 UTC
Permalink
Hello,
This patch extends autogeneration of SI-2-SF
conversions.

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_vector_convert_uns_vsivsf): Handle V16SI mode and
TARGET_AVX512VL.

--
Thanks, K

diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 7c34431..8a7853e 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -18811,6 +18811,19 @@ ix86_expand_vector_convert_uns_vsivsf (rtx target, rtx val)
enum machine_mode fltmode = GET_MODE (target);
rtx (*cvt) (rtx, rtx);

+ if (intmode == V16SImode)
+ {
+ emit_insn (gen_ufloatv16siv16sf2 (target, val));
+ return;
+ }
+ if (TARGET_AVX512VL)
+ {
+ if (intmode == V4SImode)
+ emit_insn (gen_ufloatv4siv4sf2 (target, val));
+ else
+ emit_insn (gen_ufloatv8siv8sf2 (target, val));
+ return;
+ }
if (intmode == V4SImode)
cvt = gen_floatv4siv4sf2;
else
Uros Bizjak
2014-10-09 16:05:36 UTC
Permalink
Post by Kirill Yukhin
Hello,
This patch extends autogeneration of SI-2-SF
conversions.
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_vector_convert_uns_vsivsf): Handle V16SI mode and
TARGET_AVX512VL.
--
Thanks, K
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 7c34431..8a7853e 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -18811,6 +18811,19 @@ ix86_expand_vector_convert_uns_vsivsf (rtx target, rtx val)
enum machine_mode fltmode = GET_MODE (target);
rtx (*cvt) (rtx, rtx);
Please handle this directly in floatuns<sseintvecmodelower><mode>2
expander. The V16SImode is already handled from there.

Uros.
Post by Kirill Yukhin
+ if (intmode == V16SImode)
+ {
+ emit_insn (gen_ufloatv16siv16sf2 (target, val));
+ return;
+ }
+ if (TARGET_AVX512VL)
+ {
+ if (intmode == V4SImode)
+ emit_insn (gen_ufloatv4siv4sf2 (target, val));
+ else
+ emit_insn (gen_ufloatv8siv8sf2 (target, val));
+ return;
+ }
if (intmode == V4SImode)
cvt = gen_floatv4siv4sf2;
else
Loading...