[PATCH][committed] testsuite: enable vector MIN for vec-narrow-1.C on x86

<[email protected]>
Newsgroups gmane.comp.gcc.patches
Message-ID <[email protected]>
From: Kyrylo Tkachov <[email protected]>

The positive test only folds when the wide and narrow vector MIN operations
are available.  Default x86_64 lowers the V2DI MIN before the narrowing rule
can see it, so the dump still contains the wide type.

Enable AVX512VL and AVX512DQ for x86 targets to enable the type.

Tested on x86_64-pc-linux-gnu.
Pushed to trunk.

gcc/testsuite/ChangeLog:

	* g++.dg/tree-ssa/vec-narrow-1.C: Enable AVX512VL and AVX512DQ on
	x86 targets.

Signed-off-by: Kyrylo Tkachov <[email protected]>
---
 gcc/testsuite/g++.dg/tree-ssa/vec-narrow-1.C | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gcc/testsuite/g++.dg/tree-ssa/vec-narrow-1.C b/gcc/testsuite/g++.dg/tree-ssa/vec-narrow-1.C
index de738e33c30..cec5b0ba345 100644
--- a/gcc/testsuite/g++.dg/tree-ssa/vec-narrow-1.C
+++ b/gcc/testsuite/g++.dg/tree-ssa/vec-narrow-1.C
@@ -1,5 +1,6 @@
 // { dg-do compile }
 // { dg-options "-O2 -fdump-tree-optimized" }
+// { dg-additional-options "-mavx512vl -mavx512dq" { target { i?86-*-* x86_64-*-* } } }
 // Extension is monotone, so it commutes with the comparison and the outer
 // truncation is exact.  The argument is lanewise, so a widened vector
 // MIN/MAX feeding a truncating conversion narrows.
-- 
2.50.1 (Apple Git-155)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.