From patchwork Fri Dec 8 23:37:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Edwin Lu X-Patchwork-Id: 1873995 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=oCr1OVUM; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Sn6yk3Q6Vz23n0 for ; Sat, 9 Dec 2023 10:38:22 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 818EA3858282 for ; Fri, 8 Dec 2023 23:38:20 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-oa1-x32.google.com (mail-oa1-x32.google.com [IPv6:2001:4860:4864:20::32]) by sourceware.org (Postfix) with ESMTPS id EF2343858CD1 for ; Fri, 8 Dec 2023 23:38:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EF2343858CD1 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivosinc.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org EF2343858CD1 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:4860:4864:20::32 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702078687; cv=none; b=uxtvOOdaiJFo94SkoNXBS1FN08js5YtJVBq8dG4uLCtgMBfXkVxWW1LTx63lMTGj34X4zI8soWZB3vn98DdCThe68vD/0dqvjs9TcpVqC498fKCclvI31ZgVGN6G54teQxmAL56ZbnksxmsQLEJEO4He+LczBEBf+Wovk1Vdvbc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702078687; c=relaxed/simple; bh=nFf50S+D8RzvIBdoNrzMdOVTqY+bMtgW3k/37WfeW0c=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=DLIh1OW1HwUHoi2fP+sgb67e/Y+vOKd+8RsGke1NNicm+Ejxg6+qPFtt+cqZaucsw88AVYdXoMJfMPy5lwRk0g/PUiDzbu37UmGOWKYcyi3tyOqfWW3p9M7NFk8u/jC1bavrvXZmNHJuzQ/QrZtKkYSvjBNeHpu0SayhKuHVRfI= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-oa1-x32.google.com with SMTP id 586e51a60fabf-1fa37df6da8so1560267fac.2 for ; Fri, 08 Dec 2023 15:38:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1702078683; x=1702683483; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=oQN56fFOiNKp1fTU8v8PQPJ3UqpHEc55+cU9sltxQ38=; b=oCr1OVUMy2tsBavlyK6Y6i2ZlPRIIaHS7GvAMsWNAGPfLHWkkVcMoVafY4ikg5jsaJ KDUZr4/9c2VjGpNBWSEdKBid17XM/ATteTy4LzBTzrRAfehRDA9ySBZukbld6UFSrus5 +xFnKDsSIj2BsKRQ93mAyRAWio65JzyMB3juBKI6xMKQfGDEWZ9hJt35oXoYM2HK34sb +VIN68npxratuD1nv6sJg+mvmu+eSkREz6g/TD9X4iiFKCLk1ihf/JDMjFema8G7kB3E aHRdKz2Isj9vCRBo8x/CNeE9/H6lXF4RoI6MkoZUfyVPTo/k9XBR00o26TYHn9sF7UCQ 40ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702078683; x=1702683483; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=oQN56fFOiNKp1fTU8v8PQPJ3UqpHEc55+cU9sltxQ38=; b=flRI5QPp/iLZc3Pk0K+tKbGHBkr7InNg160kxQlQlbmTP/SYQy2KFeuhZn4aIQXbEo wbz9lZMuhm6GB5Cec5a+18xCWA0ItkOhiaowrJ9+9wOK6PuFsAHmWHDMcs190KzjXXYU TUBboljMx/nX/Oks0jwuCpA6DXp3D02E1k/OtwunDjtfUu1rBiWZXgMHgQXc2YpwNknX vahGSrwbb+3ImXk2q8q7pq/TuolaHTw31O/BtGjtx7fAXjuv5jVEgseX49kGOKAx1CWX aJeQuhbhrycDa5cpma8nbUWrQYO0gLLZZgR+7eAL7Pot++q2GBaELKdfAUCneWnpBcT4 OMTw== X-Gm-Message-State: AOJu0YxrZxrKzQxLj/OqZ4CbPdVByGA3kRXwGkJWuMe+sZad/Qwq3tuQ bzwzWzxNd37DLxAEd9mQAYTV6V+9xB0I4Se+kGc= X-Google-Smtp-Source: AGHT+IEX+ODxx3HE1quQ738xszOib7ZIll0qxePPNfdnS5ZeDPFcUv7VRZscaUZETi5MYYV7/S70TQ== X-Received: by 2002:a05:6870:b605:b0:1fa:fcd5:9bb6 with SMTP id cm5-20020a056870b60500b001fafcd59bb6mr941259oab.22.1702078682678; Fri, 08 Dec 2023 15:38:02 -0800 (PST) Received: from ewlu.ba.rivosinc.com ([64.71.180.162]) by smtp.gmail.com with ESMTPSA id iv7-20020a056870b9c700b001fb3240116bsm675479oab.7.2023.12.08.15.38.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Dec 2023 15:38:02 -0800 (PST) From: Edwin Lu To: gcc-patches@gcc.gnu.org Cc: gnu-toolchain@rivosinc.com, Edwin Lu Subject: [PATCH V2] RISC-V: XFAIL scan dump fails for autovec PR111311 Date: Fri, 8 Dec 2023 15:37:59 -0800 Message-Id: <20231208233759.2732806-1-ewlu@rivosinc.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Clean up scan dump failures on linux rv64 vector targets Juzhe mentioned could be ignored for now. This will help reduce noise and make it more obvious if a bug or regression is introduced. The failures that are still reported are either execution failures or failures that are also present on armv8-a+sve gcc/testsuite/ChangeLog: * c-c++-common/vector-subscript-4.c: xfail testcase * g++.dg/tree-ssa/pr83518.C: ditto * gcc.dg/attr-alloc_size-11.c: remove xfail * gcc.dg/signbit-2.c: xfail testcase * gcc.dg/signbit-5.c: ditto * gcc.dg/tree-ssa/cunroll-16.c: ditto * gcc.dg/tree-ssa/gen-vect-34.c: ditto * gcc.dg/tree-ssa/loop-bound-1.c: ditto * gcc.dg/tree-ssa/loop-bound-2.c: ditto * gcc.dg/tree-ssa/pr84512.c: remove xfail * gcc.dg/tree-ssa/predcom-4.c: xfail testcase * gcc.dg/tree-ssa/predcom-5.c: ditto * gcc.dg/tree-ssa/predcom-9.c: ditto * gcc.dg/tree-ssa/reassoc-46.c: ditto * gcc.dg/tree-ssa/scev-10.c: ditto * gcc.dg/tree-ssa/scev-11.c: ditto * gcc.dg/tree-ssa/scev-14.c: ditto * gcc.dg/tree-ssa/scev-9.c: ditto * gcc.dg/tree-ssa/split-path-11.c: ditto * gcc.dg/tree-ssa/ssa-dom-cse-2.c: ditto * gcc.dg/tree-ssa/update-threading.c: ditto * gcc.dg/unroll-8.c: ditto * gcc.dg/var-expand1.c: ditto * gcc.dg/vect/pr103116-1.c: ditto * gcc.dg/vect/pr103116-2.c: ditto * gcc.dg/vect/pr65310.c: ditto * gfortran.dg/vect/vect-8.f90: ditto * lib/target-supports.exp: ditto Signed-off-by: Edwin Lu --- V2 changes: - added attr-alloc_size-11.c and update-threading.c which were missed in previous patch - remove pr83232.f90 xfail since it was fixed in a recent trunk update - adjust xfail on split-path-11.c to only apply to rv64 --- gcc/testsuite/c-c++-common/vector-subscript-4.c | 3 ++- gcc/testsuite/g++.dg/tree-ssa/pr83518.C | 2 +- gcc/testsuite/gcc.dg/attr-alloc_size-11.c | 4 ++-- gcc/testsuite/gcc.dg/signbit-2.c | 5 +++-- gcc/testsuite/gcc.dg/signbit-5.c | 1 + gcc/testsuite/gcc.dg/tree-ssa/cunroll-16.c | 5 +++-- gcc/testsuite/gcc.dg/tree-ssa/gen-vect-34.c | 3 ++- gcc/testsuite/gcc.dg/tree-ssa/loop-bound-1.c | 3 ++- gcc/testsuite/gcc.dg/tree-ssa/loop-bound-2.c | 3 ++- gcc/testsuite/gcc.dg/tree-ssa/pr84512.c | 2 +- gcc/testsuite/gcc.dg/tree-ssa/predcom-4.c | 5 +++-- gcc/testsuite/gcc.dg/tree-ssa/predcom-5.c | 5 +++-- gcc/testsuite/gcc.dg/tree-ssa/predcom-9.c | 3 ++- gcc/testsuite/gcc.dg/tree-ssa/reassoc-46.c | 3 ++- gcc/testsuite/gcc.dg/tree-ssa/scev-10.c | 3 ++- gcc/testsuite/gcc.dg/tree-ssa/scev-11.c | 3 ++- gcc/testsuite/gcc.dg/tree-ssa/scev-14.c | 4 +++- gcc/testsuite/gcc.dg/tree-ssa/scev-9.c | 3 ++- gcc/testsuite/gcc.dg/tree-ssa/split-path-11.c | 2 +- gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-cse-2.c | 2 +- gcc/testsuite/gcc.dg/tree-ssa/update-threading.c | 2 +- gcc/testsuite/gcc.dg/unroll-8.c | 8 +++++--- gcc/testsuite/gcc.dg/var-expand1.c | 3 ++- gcc/testsuite/gcc.dg/vect/pr103116-1.c | 3 ++- gcc/testsuite/gcc.dg/vect/pr103116-2.c | 3 ++- gcc/testsuite/gcc.dg/vect/pr65310.c | 4 ++-- gcc/testsuite/gfortran.dg/vect/vect-8.f90 | 3 ++- gcc/testsuite/lib/target-supports.exp | 3 +++ 28 files changed, 59 insertions(+), 34 deletions(-) diff --git a/gcc/testsuite/c-c++-common/vector-subscript-4.c b/gcc/testsuite/c-c++-common/vector-subscript-4.c index 2c2481f88b7..eb0bca1c19e 100644 --- a/gcc/testsuite/c-c++-common/vector-subscript-4.c +++ b/gcc/testsuite/c-c++-common/vector-subscript-4.c @@ -25,5 +25,6 @@ foobar(16) foobar(32) foobar(64) +/* Xfail riscv PR112531. */ /* Verify we don't have any vector temporaries in the IL. */ -/* { dg-final { scan-tree-dump-not "vector" "optimized" } } */ +/* { dg-final { scan-tree-dump-not "vector" "optimized" { xfail { riscv_v && vect_variable_length } } } } */ diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr83518.C b/gcc/testsuite/g++.dg/tree-ssa/pr83518.C index b8a2bd1ebbd..6f2fc56c82c 100644 --- a/gcc/testsuite/g++.dg/tree-ssa/pr83518.C +++ b/gcc/testsuite/g++.dg/tree-ssa/pr83518.C @@ -24,4 +24,4 @@ unsigned test() return sum; } -/* { dg-final { scan-tree-dump "return 15;" "optimized" { xfail vect_variable_length } } } */ +/* { dg-final { scan-tree-dump "return 15;" "optimized" { xfail { vect_variable_length && aarch64*-*-* } } } } */ diff --git a/gcc/testsuite/gcc.dg/attr-alloc_size-11.c b/gcc/testsuite/gcc.dg/attr-alloc_size-11.c index a2efe128915..2828db12e05 100644 --- a/gcc/testsuite/gcc.dg/attr-alloc_size-11.c +++ b/gcc/testsuite/gcc.dg/attr-alloc_size-11.c @@ -47,8 +47,8 @@ typedef __SIZE_TYPE__ size_t; /* The following tests fail because of missing range information. The xfail exclusions are PR79356. */ -TEST (signed char, SCHAR_MIN + 2, ALLOC_MAX); /* { dg-warning "argument 1 range \\\[13, \[0-9\]+\\\] exceeds maximum object size 12" "missing range info for signed char" { xfail { ! { aarch64*-*-* arm*-*-* avr-*-* alpha*-*-* cris-*-* ia64-*-* mips*-*-* or1k*-*-* pdp11*-*-* powerpc*-*-* sparc*-*-* s390*-*-* visium-*-* msp430-*-* nvptx*-*-*} } } } */ -TEST (short, SHRT_MIN + 2, ALLOC_MAX); /* { dg-warning "argument 1 range \\\[13, \[0-9\]+\\\] exceeds maximum object size 12" "missing range info for short" { xfail { ! { aarch64*-*-* arm*-*-* alpha*-*-* avr-*-* cris-*-* ia64-*-* mips*-*-* or1k*-*-* pdp11*-*-* powerpc*-*-* sparc*-*-* s390x-*-* visium-*-* msp430-*-* nvptx*-*-* } } } } */ +TEST (signed char, SCHAR_MIN + 2, ALLOC_MAX); /* { dg-warning "argument 1 range \\\[13, \[0-9\]+\\\] exceeds maximum object size 12" "missing range info for signed char" { xfail { ! { aarch64*-*-* arm*-*-* avr-*-* alpha*-*-* cris-*-* ia64-*-* mips*-*-* or1k*-*-* pdp11*-*-* powerpc*-*-* sparc*-*-* s390*-*-* visium-*-* msp430-*-* nvptx*-*-* riscv*-*-* } } } } */ +TEST (short, SHRT_MIN + 2, ALLOC_MAX); /* { dg-warning "argument 1 range \\\[13, \[0-9\]+\\\] exceeds maximum object size 12" "missing range info for short" { xfail { ! { aarch64*-*-* arm*-*-* alpha*-*-* avr-*-* cris-*-* ia64-*-* mips*-*-* or1k*-*-* pdp11*-*-* powerpc*-*-* sparc*-*-* s390x-*-* visium-*-* msp430-*-* nvptx*-*-* riscv*-*-* } } } } */ TEST (int, INT_MIN + 2, ALLOC_MAX); /* { dg-warning "argument 1 range \\\[13, \[0-9\]+\\\] exceeds maximum object size 12" } */ TEST (int, -3, ALLOC_MAX); /* { dg-warning "argument 1 range \\\[13, \[0-9\]+\\\] exceeds maximum object size 12" } */ TEST (int, -2, ALLOC_MAX); /* { dg-warning "argument 1 range \\\[13, \[0-9\]+\\\] exceeds maximum object size 12" } */ diff --git a/gcc/testsuite/gcc.dg/signbit-2.c b/gcc/testsuite/gcc.dg/signbit-2.c index 62bb4047d74..2a32568de9e 100644 --- a/gcc/testsuite/gcc.dg/signbit-2.c +++ b/gcc/testsuite/gcc.dg/signbit-2.c @@ -22,6 +22,7 @@ void fun2(int32_t *x, int n) } /* Xfail amdgcn where vector truth type is not integer type. */ -/* { dg-final { scan-tree-dump {\s+>\s+\{ 0(, 0)+ \}} optimized { target vect_shift xfail amdgcn-*-* } } } */ +/* Xfail riscv PR111311. */ +/* { dg-final { scan-tree-dump {\s+>\s+\{ 0(, 0)+ \}} optimized { target vect_shift xfail { amdgcn-*-* || { riscv_v && vect_variable_length } } } } } */ /* { dg-final { scan-tree-dump {\s+>\s+0} optimized { target { ! vect_shift } } } } */ -/* { dg-final { scan-tree-dump-not {\s+>>\s+31} optimized { xfail amdgcn-*-* } } } */ +/* { dg-final { scan-tree-dump-not {\s+>>\s+31} optimized { xfail { amdgcn-*-* || { riscv_v && vect_variable_length } } } } } */ diff --git a/gcc/testsuite/gcc.dg/signbit-5.c b/gcc/testsuite/gcc.dg/signbit-5.c index 0fad56c0ea8..becf8b45aa8 100644 --- a/gcc/testsuite/gcc.dg/signbit-5.c +++ b/gcc/testsuite/gcc.dg/signbit-5.c @@ -4,6 +4,7 @@ /* This test does not work when the truth type does not match vector type. */ /* { dg-additional-options "-mno-avx512f" { target { i?86-*-* x86_64-*-* } } } */ /* { dg-additional-options "-march=armv8-a" { target aarch64_sve } } */ +/* { dg-additional-options "-fwrapv" { target riscv_v } } */ /* { dg-xfail-run-if "truth type does not match vector type" { amdgcn-*-* } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/cunroll-16.c b/gcc/testsuite/gcc.dg/tree-ssa/cunroll-16.c index 9bb66ff8299..53bb75e9c17 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/cunroll-16.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/cunroll-16.c @@ -13,5 +13,6 @@ int main() { foo(); } -/* { dg-final { scan-tree-dump "optimized: loop with \[0-9\]\+ iterations completely unrolled" "cunroll" } } */ -/* { dg-final { scan-tree-dump-not "foo" "optimized" } } */ +/* Xfail riscv PR111311. */ +/* { dg-final { scan-tree-dump "optimized: loop with \[0-9\]\+ iterations completely unrolled" "cunroll" { xfail { riscv_v && vect_variable_length } } } } */ +/* { dg-final { scan-tree-dump-not "foo" "optimized" { xfail { riscv_v && vect_variable_length } } } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-34.c b/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-34.c index c2e5dfea35f..49b59f6d8d7 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-34.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-34.c @@ -13,4 +13,5 @@ float summul(int n, float *arg1, float *arg2) return res1; } -/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_masked_load } } } */ +/* Xfail riscv PR111311. */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_masked_load xfail { riscv_v && vect_variable_length } } } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loop-bound-1.c b/gcc/testsuite/gcc.dg/tree-ssa/loop-bound-1.c index aedcac2103a..022a8a00ad2 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/loop-bound-1.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/loop-bound-1.c @@ -17,6 +17,7 @@ foo (unsigned char s, unsigned char l) return sum; } +/* Xfail riscv PR111311. */ /* Check loop niter bound information. */ -/* { dg-final { scan-tree-dump "bounded by 254" "ivopts" } } */ +/* { dg-final { scan-tree-dump "bounded by 254" "ivopts" { xfail { riscv_v && vect_variable_length } } } } */ /* { dg-final { scan-tree-dump-not "bounded by 255" "ivopts" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loop-bound-2.c b/gcc/testsuite/gcc.dg/tree-ssa/loop-bound-2.c index 802dd290e50..06ccb1d7029 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/loop-bound-2.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/loop-bound-2.c @@ -17,7 +17,8 @@ foo (signed char s, signed char l) return sum; } +/* Xfail riscv PR111311. */ /* Check loop niter bound information. */ -/* { dg-final { scan-tree-dump "bounded by 254" "ivopts" } } */ +/* { dg-final { scan-tree-dump "bounded by 254" "ivopts" {xfail { riscv_v && vect_variable_length } } } } */ /* { dg-final { scan-tree-dump-not "bounded by 255" "ivopts" } } */ /* { dg-final { scan-tree-dump-not "zero if " "ivopts" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr84512.c b/gcc/testsuite/gcc.dg/tree-ssa/pr84512.c index 496c78b28dc..4ec8cbb69b4 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/pr84512.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr84512.c @@ -13,4 +13,4 @@ int foo() } /* Listed targets xfailed due to PR84958. */ -/* { dg-final { scan-tree-dump "return 285;" "optimized" { xfail { amdgcn*-*-* || vect_variable_length } } } } */ +/* { dg-final { scan-tree-dump "return 285;" "optimized" { xfail { amdgcn*-*-* || { aarch64*-*-* && vect_variable_length } } } } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/predcom-4.c b/gcc/testsuite/gcc.dg/tree-ssa/predcom-4.c index af9ae0e0f3d..351243c3d24 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/predcom-4.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/predcom-4.c @@ -24,6 +24,7 @@ int main(void) return 0; } -/* { dg-final { scan-tree-dump-times "Combination" 1 "pcom"} } */ -/* { dg-final { scan-tree-dump-times "Unrolling 3 times." 1 "pcom"} } */ +/* Xfail riscv PR112531. */ +/* { dg-final { scan-tree-dump-times "Combination" 1 "pcom" { xfail { riscv_v && vect_variable_length } } } } */ +/* { dg-final { scan-tree-dump-times "Unrolling 3 times." 1 "pcom" { xfail { riscv_v && vect_variable_length } } } } */ /* { dg-final { scan-tree-dump-not "Invalid sum" "pcom" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/predcom-5.c b/gcc/testsuite/gcc.dg/tree-ssa/predcom-5.c index 52adb59d669..d35363d1942 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/predcom-5.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/predcom-5.c @@ -24,6 +24,7 @@ int main(void) return 0; } -/* { dg-final { scan-tree-dump-times "Combination" 2 "pcom"} } */ -/* { dg-final { scan-tree-dump-times "Unrolling 3 times." 1 "pcom"} } */ +/* Xfail riscv PR112531. */ +/* { dg-final { scan-tree-dump-times "Combination" 2 "pcom" { xfail { riscv_v && vect_variable_length } } } } */ +/* { dg-final { scan-tree-dump-times "Unrolling 3 times." 1 "pcom" { xfail { riscv_v && vect_variable_length } } } } */ /* { dg-final { scan-tree-dump-not "Invalid sum" "pcom" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/predcom-9.c b/gcc/testsuite/gcc.dg/tree-ssa/predcom-9.c index b0fb0e2d4c5..2c0b9af846e 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/predcom-9.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/predcom-9.c @@ -16,5 +16,6 @@ void foo (void) } } +/* Xfail riscv PR112531. */ /* { dg-final { scan-tree-dump-not "Sinking # VUSE" "sink1" } } */ -/* { dg-final { scan-tree-dump "Executing predictive commoning without unrolling" "pcom" } } */ +/* { dg-final { scan-tree-dump "Executing predictive commoning without unrolling" "pcom" { xfail { riscv_v && vect_variable_length } } } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/reassoc-46.c b/gcc/testsuite/gcc.dg/tree-ssa/reassoc-46.c index 97563dd929f..37bfe28213f 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/reassoc-46.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/reassoc-46.c @@ -3,5 +3,6 @@ #include "reassoc-46.h" +/* Xfail riscv PR112531. */ /* Check that the loop accumulator is added last. */ -/* { dg-final { scan-tree-dump-times {(?:vect_)?sum_[\d._]+ = (?:(?:vect_)?_[\d._]+ \+ (?:vect_)?sum_[\d._]+|(?:vect_)?sum_[\d._]+ \+ (?:vect_)?_[\d._]+)} 1 "optimized" } } */ +/* { dg-final { scan-tree-dump-times {(?:vect_)?sum_[\d._]+ = (?:(?:vect_)?_[\d._]+ \+ (?:vect_)?sum_[\d._]+|(?:vect_)?sum_[\d._]+ \+ (?:vect_)?_[\d._]+)} 1 "optimized" { xfail { riscv_v && vect_variable_length } } } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/scev-10.c b/gcc/testsuite/gcc.dg/tree-ssa/scev-10.c index ba111914b3c..a1b43932b49 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/scev-10.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/scev-10.c @@ -17,6 +17,7 @@ foo (signed char s, signed char l) return sum; } +/* Xfail riscv PR112531. */ /* Address of array reference is scev. */ -/* { dg-final { scan-tree-dump-times " Type:\\tREFERENCE ADDRESS\n" 1 "ivopts" } } */ +/* { dg-final { scan-tree-dump-times " Type:\\tREFERENCE ADDRESS\n" 1 "ivopts" { xfail { riscv_v && vect_variable_length } } } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/scev-11.c b/gcc/testsuite/gcc.dg/tree-ssa/scev-11.c index f15688538ea..c7ec60acc7c 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/scev-11.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/scev-11.c @@ -22,5 +22,6 @@ foo (int n) return 0; } +/* Xfail riscv PR112531. */ /* Address of array reference to b is scev. */ -/* { dg-final { scan-tree-dump-times " Type:\\tREFERENCE ADDRESS\n" 2 "ivopts" } } */ +/* { dg-final { scan-tree-dump-times " Type:\\tREFERENCE ADDRESS\n" 2 "ivopts" { xfail { riscv_v && vect_variable_length } } } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/scev-14.c b/gcc/testsuite/gcc.dg/tree-ssa/scev-14.c index d7865fea24a..323a870c9d6 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/scev-14.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/scev-14.c @@ -7,4 +7,6 @@ void t(unsigned int n) for (i=0; i> 4) ? 8 : 64 + (i >> 4)) << 8) + (i << 4) } ).a); exit (0); } -/* { dg-final { scan-tree-dump-times "Invalid sum" 0 "optimized" { xfail cris-*-* } } } Xfail: PR110628 */ +/* { dg-final { scan-tree-dump-times "Invalid sum" 0 "optimized" { xfail { cris-*-* riscv*-*-* } } } } Xfail: PR110628 */ diff --git a/gcc/testsuite/gcc.dg/unroll-8.c b/gcc/testsuite/gcc.dg/unroll-8.c index 4388f47d4c7..231ffffade7 100644 --- a/gcc/testsuite/gcc.dg/unroll-8.c +++ b/gcc/testsuite/gcc.dg/unroll-8.c @@ -9,9 +9,11 @@ int t(struct a *a, int n) for (i=0;ia[i]++; } + +/* Xfail riscv PR112531. */ /* { dg-final { scan-rtl-dump-not "Unrolled loop" "loop2_unroll" } } */ -/* { dg-final { scan-rtl-dump "likely upper bound: 6" "loop2_unroll" } } */ -/* { dg-final { scan-rtl-dump "realistic bound: -1" "loop2_unroll" } } */ -/* { dg-final { scan-rtl-dump "Not unrolling loop, doesn't roll" "loop2_unroll" } } */ +/* { dg-final { scan-rtl-dump "likely upper bound: 6" "loop2_unroll" { xfail { riscv_v && vect_variable_length } } } } */ +/* { dg-final { scan-rtl-dump "realistic bound: -1" "loop2_unroll" { xfail { riscv_v && vect_variable_length } } } } */ +/* { dg-final { scan-rtl-dump "Not unrolling loop, doesn't roll" "loop2_unroll" { xfail { riscv_v && vect_variable_length } } } } */ /* { dg-final { scan-rtl-dump-not "Invalid sum" "loop2_unroll" } } */ /* { dg-final { scan-rtl-dump-not "upper bound: -1" "loop2_unroll" } } */ diff --git a/gcc/testsuite/gcc.dg/var-expand1.c b/gcc/testsuite/gcc.dg/var-expand1.c index 3d536cef2b3..eb7b6aeb18b 100644 --- a/gcc/testsuite/gcc.dg/var-expand1.c +++ b/gcc/testsuite/gcc.dg/var-expand1.c @@ -25,4 +25,5 @@ int main (void) return foo (10); } -/* { dg-final { scan-rtl-dump "Expanding Accumulator" "loop2_unroll" } } */ +/* Xfail riscv PR111311. */ +/* { dg-final { scan-rtl-dump "Expanding Accumulator" "loop2_unroll" { xfail { riscv_v && vect_variable_length } } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/pr103116-1.c b/gcc/testsuite/gcc.dg/vect/pr103116-1.c index d3639fc8cfd..4c7eb9be199 100644 --- a/gcc/testsuite/gcc.dg/vect/pr103116-1.c +++ b/gcc/testsuite/gcc.dg/vect/pr103116-1.c @@ -47,4 +47,5 @@ main (void) return 0; } -/* { dg-final { scan-tree-dump "Data access with gaps requires scalar epilogue loop" "vect" { target { vect_perm && vect_int } } } } */ +/* Xfail riscv PR112531. */ +/* { dg-final { scan-tree-dump "Data access with gaps requires scalar epilogue loop" "vect" { target { vect_perm && vect_int } xfail { riscv_v && vect_variable_length } } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/pr103116-2.c b/gcc/testsuite/gcc.dg/vect/pr103116-2.c index aa9797a9407..1d070de1fe9 100644 --- a/gcc/testsuite/gcc.dg/vect/pr103116-2.c +++ b/gcc/testsuite/gcc.dg/vect/pr103116-2.c @@ -56,4 +56,5 @@ main (void) return 0; } -/* { dg-final { scan-tree-dump "peeling for gaps insufficient for access" "vect" { target { vect_perm_short } } } } */ +/* Xfail riscv PR112531. */ +/* { dg-final { scan-tree-dump "peeling for gaps insufficient for access" "vect" { target { vect_perm_short } xfail { riscv_v && vect_variable_length } } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/pr65310.c b/gcc/testsuite/gcc.dg/vect/pr65310.c index 57e90d45c9f..63a9c987a6b 100644 --- a/gcc/testsuite/gcc.dg/vect/pr65310.c +++ b/gcc/testsuite/gcc.dg/vect/pr65310.c @@ -18,5 +18,5 @@ int t(b *a) /* The memory access is through a pointer of type c which means *ptr is not aligned. */ -/* { dg-final { scan-tree-dump "can't force alignment" "vect" { xfail vect_element_align_preferred } } } */ -/* { dg-final { scan-tree-dump-not "misalign = 0" "vect" { xfail vect_element_align_preferred } } } */ +/* { dg-final { scan-tree-dump "can't force alignment" "vect" { xfail { vect_element_align_preferred || { riscv*-*-* && { ! riscv_v } } } } } } */ +/* { dg-final { scan-tree-dump-not "misalign = 0" "vect" { xfail { vect_element_align_preferred || { riscv*-*-* && { ! riscv_v } } } } } } */ diff --git a/gcc/testsuite/gfortran.dg/vect/vect-8.f90 b/gcc/testsuite/gfortran.dg/vect/vect-8.f90 index ca72ddcffca..75bd78db1ce 100644 --- a/gcc/testsuite/gfortran.dg/vect/vect-8.f90 +++ b/gcc/testsuite/gfortran.dg/vect/vect-8.f90 @@ -704,7 +704,8 @@ CALL track('KERNEL ') RETURN END SUBROUTINE kernel +! Xfail riscv PR112531. ! { dg-final { scan-tree-dump-times "vectorized 25 loops" 1 "vect" { target aarch64_sve } } } ! { dg-final { scan-tree-dump-times "vectorized 24 loops" 1 "vect" { target { aarch64*-*-* && { ! aarch64_sve } } } } } -! { dg-final { scan-tree-dump-times "vectorized 2\[234\] loops" 1 "vect" { target { vect_intdouble_cvt && { ! aarch64*-*-* } } } } } +! { dg-final { scan-tree-dump-times "vectorized 2\[234\] loops" 1 "vect" { target { vect_intdouble_cvt && { ! aarch64*-*-* } } xfail { riscv_v && vect_variable_length } } } } ! { dg-final { scan-tree-dump-times "vectorized 17 loops" 1 "vect" { target { { ! vect_intdouble_cvt } && { ! aarch64*-*-* } } } } } diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 40a60c198cf..f99ae5578c2 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -1898,6 +1898,9 @@ proc check_effective_target_riscv_d { } { # Cache the result. proc check_effective_target_riscv_v { } { + if { ![istarget riscv*-*-*] } { + return 0 + } return [check_no_compiler_messages riscv_ext_v assembly { #ifndef __riscv_v #error "Not __riscv_v"