+2020-04-11 Uroš Bizjak <ubizjak@gmail.com>
+
+ PR target/94494
+ * config/i386/sse.md (REDUC_SSE_SMINMAX_MODE): Use TARGET_SSE2
+ condition for V4SI, V8HI and V16QI modes.
+
2020-04-11 Jakub Jelinek <jakub@redhat.com>
PR debug/94495
;; Modes handled by reduc_sm{in,ax}* patterns.
(define_mode_iterator REDUC_SSE_SMINMAX_MODE
[(V4SF "TARGET_SSE") (V2DF "TARGET_SSE")
- (V2DI "TARGET_SSE4_2") (V4SI "TARGET_SSE") (V8HI "TARGET_SSE")
- (V16QI "TARGET_SSE")])
+ (V4SI "TARGET_SSE2") (V8HI "TARGET_SSE2") (V16QI "TARGET_SSE2")
+ (V2DI "TARGET_SSE4_2")])
(define_expand "reduc_<code>_scal_<mode>"
[(smaxmin:REDUC_SSE_SMINMAX_MODE
+2020-04-11 Uroš Bizjak <ubizjak@gmail.com>
+
+ PR target/94494
+ * gcc.target/i386/pr94494.c: New test.
+
2020-04-11 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/94482
--- /dev/null
+/* PR target/94494 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-vectorize -msse -mno-sse2" } */
+
+void
+foo (float *item, float *f, float *out,
+ int threshold, int wi, int lo, int hi, int value)
+{
+ for (int i = 0; i < wi; i++) {
+ if (item[i] > 0) {
+ int found = 0;
+
+ for (int k = lo; k < hi; k++)
+ if (f[k] > 0)
+ found = 1;
+
+ if (found > 0)
+ out[i] = threshold;
+ else if (out[i] > value)
+ out[i] -= 1;
+ }
+ }
+}