[Bug target/98218] [TARGET_MMX_WITH_SSE] Implement 64bit vector compares (AVX512 masked compares missing)

2024-06-20 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98218

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|12.4|12.5

--- Comment #20 from Richard Biener  ---
GCC 12.4 is being released, retargeting bugs to GCC 12.5.

[Bug target/98218] [TARGET_MMX_WITH_SSE] Implement 64bit vector compares (AVX512 masked compares missing)

2023-05-08 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98218

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|12.3|12.4

--- Comment #19 from Richard Biener  ---
GCC 12.3 is being released, retargeting bugs to GCC 12.4.

[Bug target/98218] [TARGET_MMX_WITH_SSE] Implement 64bit vector compares (AVX512 masked compares missing)

2022-08-19 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98218

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|12.2|12.3

--- Comment #18 from Richard Biener  ---
GCC 12.2 is being released, retargeting bugs to GCC 12.3.

[Bug target/98218] [TARGET_MMX_WITH_SSE] Implement 64bit vector compares (AVX512 masked compares missing)

2022-05-06 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98218

Jakub Jelinek  changed:

   What|Removed |Added

   Target Milestone|12.0|12.2

--- Comment #17 from Jakub Jelinek  ---
GCC 12.1 is being released, retargeting bugs to GCC 12.2.

[Bug target/98218] [TARGET_MMX_WITH_SSE] Implement 64bit vector compares (AVX512 masked compares missing)

2021-05-13 Thread ubizjak at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98218

--- Comment #16 from Uroš Bizjak  ---
(In reply to David Binderman from comment #15)
> Bug first appears sometime between git hash 21dfb22920ce32fc,
> dated yesterday and git hash 097fde5e7514e909, dated today.

Fixed by PR100581.

[Bug target/98218] [TARGET_MMX_WITH_SSE] Implement 64bit vector compares (AVX512 masked compares missing)

2021-05-12 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98218

--- Comment #15 from David Binderman  ---
Bug first appears sometime between git hash 21dfb22920ce32fc,
dated yesterday and git hash 097fde5e7514e909, dated today.

[Bug target/98218] [TARGET_MMX_WITH_SSE] Implement 64bit vector compares (AVX512 masked compares missing)

2021-05-12 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98218

--- Comment #14 from David Binderman  ---
(In reply to Uroš Bizjak from comment #13)
> A wild guess: you are compiling for TARGET_XOP?

Not sure. bdver2.

Reduced C code:

typedef float DBL;
struct {
  DBL c_x, c_y
} Random_Simis_Cur;
Random_Simis_i;
DBL Gauss_Rand() {
  int __trans_tmp_1;
  DBL S, y = exp(S) / 0;
  if (__trans_tmp_1)
return y;
  return -y;
}
draw_ifs() {
  while (Random_Simis_i--) {
Random_Simis_Cur.c_x = Gauss_Rand();
Random_Simis_Cur.c_y = Gauss_Rand();
  }
}

Command line is

$ /home/dcb/gcc/results/bin/gcc -c -w -O3 -march=bdver2 -ffast-math bug717.c

[Bug target/98218] [TARGET_MMX_WITH_SSE] Implement 64bit vector compares (AVX512 masked compares missing)

2021-05-12 Thread ubizjak at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98218

--- Comment #13 from Uroš Bizjak  ---
(In reply to Uroš Bizjak from comment #12)
> Yeah, this is a non-existent SSE "cmove". I tried to find all paths where
> this should divert to a sequence of logic instructions or PBLENDB, but due
> to plethora of ISAs some cmove expansions fell through the cracks.
> Fortunately, easy to fix problem, please just provide a testcase.

A wild guess: you are compiling for TARGET_XOP?

diff --git a/gcc/config/i386/mmx.md b/gcc/config/i386/mmx.md
index d433c524652..7fc2e5d781c 100644
--- a/gcc/config/i386/mmx.md
+++ b/gcc/config/i386/mmx.md
@@ -1816,11 +1816,11 @@

 ;; XOP parallel XMM conditional moves
 (define_insn "*xop_pcmov_"
-  [(set (match_operand:MMXMODEI 0 "register_operand" "=x")
-(if_then_else:MMXMODEI
-  (match_operand:MMXMODEI 3 "register_operand" "x")
-  (match_operand:MMXMODEI 1 "register_operand" "x")
-  (match_operand:MMXMODEI 2 "register_operand" "x")))]
+  [(set (match_operand:MMXMODE124 0 "register_operand" "=x")
+(if_then_else:MMXMODE124
+  (match_operand:MMXMODE124 3 "register_operand" "x")
+  (match_operand:MMXMODE124 1 "register_operand" "x")
+  (match_operand:MMXMODE124 2 "register_operand" "x")))]
   "TARGET_XOP && TARGET_MMX_WITH_SSE"
   "vpcmov\t{%3, %2, %1, %0|%0, %1, %2, %3}"
   [(set_attr "type" "sse4arg")])

[Bug target/98218] [TARGET_MMX_WITH_SSE] Implement 64bit vector compares (AVX512 masked compares missing)

2021-05-12 Thread ubizjak at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98218

--- Comment #12 from Uroš Bizjak  ---
(In reply to David Binderman from comment #11)
> I might be seeing something similar:
> 
> caxcpy.f: In function 'caxcpy':
> caxcpy.f:53:72: error: unrecognizable insn:
>53 |   end subroutine
>   | 
> ^
> (insn 136 135 137 16 (set (reg:V2SF 107 [ vect__96.11 ])
> (if_then_else:V2SF (reg:V2SF 220)
> (reg:V2SF 84 [ _3 ])
> (reg:V2SF 219))) -1
>  (nil))
> during RTL pass: vregs
> caxcpy.f:53:72: internal compiler error: in extract_insn, at recog.c:2770

Yeah, this is a non-existent SSE "cmove". I tried to find all paths where this
should divert to a sequence of logic instructions or PBLENDB, but due to
plethora of ISAs some cmove expansions fell through the cracks. Fortunately,
easy to fix problem, please just provide a testcase.

[Bug target/98218] [TARGET_MMX_WITH_SSE] Implement 64bit vector compares (AVX512 masked compares missing)

2021-05-12 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98218

David Binderman  changed:

   What|Removed |Added

 CC||dcb314 at hotmail dot com

--- Comment #11 from David Binderman  ---
I might be seeing something similar:

caxcpy.f: In function 'caxcpy':
caxcpy.f:53:72: error: unrecognizable insn:
   53 |   end subroutine
  |   
^
(insn 136 135 137 16 (set (reg:V2SF 107 [ vect__96.11 ])
(if_then_else:V2SF (reg:V2SF 220)
(reg:V2SF 84 [ _3 ])
(reg:V2SF 219))) -1
 (nil))
during RTL pass: vregs
caxcpy.f:53:72: internal compiler error: in extract_insn, at recog.c:2770

[Bug target/98218] [TARGET_MMX_WITH_SSE] Implement 64bit vector compares (AVX512 masked compares missing)

2021-05-11 Thread crazylht at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98218

--- Comment #10 from Hongtao.liu  ---
(In reply to Uroš Bizjak from comment #9)
> Un-assigning for AVX512.

I'll take a look.

[Bug target/98218] [TARGET_MMX_WITH_SSE] Implement 64bit vector compares (AVX512 masked compares missing)

2021-05-11 Thread ubizjak at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98218

Uroš Bizjak  changed:

   What|Removed |Added

   Assignee|ubizjak at gmail dot com   |unassigned at gcc dot 
gnu.org

--- Comment #9 from Uroš Bizjak  ---
Un-assigning for AVX512.

[Bug target/98218] [TARGET_MMX_WITH_SSE] Implement 64bit vector compares (AVX512 masked compares missing)

2021-05-11 Thread ubizjak at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98218

Uroš Bizjak  changed:

   What|Removed |Added

Summary|[TARGET_MMX_WITH_SSE] Miss  |[TARGET_MMX_WITH_SSE]
   |vec_cmpmn/vcondmn expander  |Implement 64bit vector
   |for 64bit vector|compares (AVX512 masked
   ||compares missing)
 Status|RESOLVED|NEW
 Resolution|FIXED   |---

--- Comment #8 from Uroš Bizjak  ---
AVX512 masked compares are currently not implemented and fall back to
vpblendvb/vpblendps.