https://gcc.gnu.org/g:f7c7c044d44e71c690a65534f76ec67c6a7fe2a0
commit r17-3160-gf7c7c044d44e71c690a65534f76ec67c6a7fe2a0 Author: Kyrylo Tkachov <[email protected]> Date: Sun Aug 9 12:14:30 2026 +0200 testsuite: enable vector MIN for vec-narrow-1.C on x86 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. 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]> Diff: --- 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 de738e33c303..cec5b0ba3454 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.
