From patchwork Thu Feb 15 01:11:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Edwin Lu X-Patchwork-Id: 201227 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:b825:b0:106:860b:bbdd with SMTP id da37csp96072dyb; Wed, 14 Feb 2024 17:14:16 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVxNP0O4ZKSon7PGMRnVZAid1FbKHlJRsP5SbI54zNgkMzc9zHlkM1arM2G0q584gDFu6eqWA9GSOVEHRcAaM3CHt8OoA== X-Google-Smtp-Source: AGHT+IGPLxkp4jAW6m8/oF13k8peHQVXqwAkQ19DNU1kF7ZlDr3ApoCHTbsFryDESvMyC5uH5+CY X-Received: by 2002:a0c:e3d3:0:b0:68e:e37d:a38 with SMTP id e19-20020a0ce3d3000000b0068ee37d0a38mr423912qvl.7.1707959656261; Wed, 14 Feb 2024 17:14:16 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707959656; cv=pass; d=google.com; s=arc-20160816; b=usk7XWtkrHPw2vzPUph+5nwSx7EGTQ3jk7PrPFgBqO9x4wFjHN0/i2+ALZ1WxNjoFK 5oktoNwEbzFKnGsf7/k7BIE/35pLVrCjCUzt5a4vZkGy5Gs62MynWxUIlrN+RzUyuSRQ rGR5F6pbSOsq7+mcTR26H/AS1E7/Uk3OeEDrxMqbZH7bPvPSjBuOxU22lgQgQBdRzWMs XGZVSpkk302qQXDaYqVJUFO0oQWXzxmD2Y8EM31ZFdOP9bR/nr1kyjbKlWBisMrZnmaH /jdNPjabp2URDC8reIDFh53gZp5SLJbKd6nZeb/QMYgug29LVUqkHiXOJh4ZtjkbplFK 7wqQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=OM4n+k+nn72NHmSG8xQ3afyIN9h1oJ6XEh0pi0a5Vik=; fh=r+SIYcgLopsTG8D0vSkuNNcbfbLGreWBAuINt5YEr6Q=; b=MHAxP6toK4/L8APydnB1HcJYyJKALCgfkAGkNs1F70M6Imodio3OO3K2Tl/uVhsmof sQHVf1yHwurE9jzBdoJneYzNaTibCljNVPloBGqG0vhkS+uyNes6iI7OvjedNtwJaB4+ A7pWecND1hj8R5uu7DHSohHR3SPxsnOklYzt5QCgDG2+ArtRxYcSVqZMHgeeJU+70bFj epPV3SZRNw2UhFX7+M5PsneN0bfy43yMuQjKdrsyRbvo4XyUUrIgjJB/+jZLROYGLvWl J3NBRIhaeSjcArS8ZW7v9qS9unn9fFWBR3dCwkxl01tt84MbIchKycIjGHRXwbMRssv+ KVEw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=fIwMcERW; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id s5-20020a0562140ca500b0068d14ecdfacsi329387qvs.66.2024.02.14.17.14.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 17:14:16 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=fIwMcERW; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E46153861811 for ; Thu, 15 Feb 2024 01:14:15 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by sourceware.org (Postfix) with ESMTPS id 66E4B3861833 for ; Thu, 15 Feb 2024 01:11:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 66E4B3861833 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 66E4B3861833 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::632 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707959500; cv=none; b=fT8F6SbHmJxJeeMV8VgFQfNAermq4XRPc1+H2mKZJMtKPvvIzaxHPMKHtptAr35yLuyEoaEU0WrBQVlbZ/+GDbqFzhMKFZotjntcDhGxP/ImThXosh2rA6PhdCqDfaAAch8gDiplfzVTAsSzSsCHRanTn2DSGS3AlR2xQTJSX5k= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707959500; c=relaxed/simple; bh=cbSdloavP/L1EGEkcO0aiAWHO9LsEioL4y9dJ+FVumU=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=Yso1ujySZdbYzQX2uMKe5n0VMrnNeK3E72Gw/v+OrHbO50X1KPYTBoys91hqiLm3tB2Iipl6c6HYsoi/1bitwnenb52EMROuCFRZdGLjj4YaTRiN/QTAR4xxfckTFxjYs3vxQwxmhh2qkReAOqJVcehjbQ9oLiHmGpB1O7sxZLs= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-1d911c2103aso2403695ad.0 for ; Wed, 14 Feb 2024 17:11:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1707959493; x=1708564293; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=OM4n+k+nn72NHmSG8xQ3afyIN9h1oJ6XEh0pi0a5Vik=; b=fIwMcERWyW6cL6p32oLQ8wuVp7UItPrpjT4yGyzPlyAhE28dYLq20uNaLzBHVROMai LNi/EtoG4CZRL4ExVKscLF5zrYuEykxAgxqYpTCxjuogBLtGg2fbHh6pJ02//ym3+JoZ bHgbH7QVYttOXSQ0gmPCX8wcEkXHiR/8nuV1zZSW1VFHPOeQaOMIslvQ/pChXHCSgnKC M7LbtBbyd52QJQaaN4+44yrWP8UCMISx4GZFWGEd7Qr7/6jxXWl94QEScYqtgmC5WbUl ZUkJMvawVUdZ/qnpdx1j+BiiwwnX6L3kaaMGtngbwNCK2RDHhbJYjuD/o1TG+a/3zVzL DmmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707959493; x=1708564293; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OM4n+k+nn72NHmSG8xQ3afyIN9h1oJ6XEh0pi0a5Vik=; b=inUrGthco7GgXk9a96gt9H38tDEYpsYcjBO+2Mo93e8d67OOuF3hJ0mDsGbW9Pg9hv Zkfa657/UChGkTrulu0/p41rcojAWTUbQQKl4SuBbqwVRgL59nwc8OY4+vxfZyJJWqDL nZEG4gZ3rhIrkUfweArh9+mqhM40YW6ZKLgwMVUCiHGqrgYj/CYzA822c3cmOBmfmPUY depL2ftGjnXbdkSpTD6VBuVRIdSF/LSTsUTtwT0vvikBya0L+J2isB8AF1N7Y9BtbHeB rPZy36iyZtSp6GsgM3JjuHT4Lre8aIPycPqUKhH117hv70KNa7sZiOirgqBOlIciHkL1 aLFg== X-Gm-Message-State: AOJu0YzWTOD2v04bJXmtntiIaKl+1GecTmlJ0YlgXvfHCSolzoVb3Uwa eE9F/PgsPXh8WFez9nmiFtqJgv3RgUoZZE116C5aUsec8yHd9D/6bNbzMq5wZeGr2JRCq2gUbWM P X-Received: by 2002:a17:902:eccb:b0:1d8:deb5:3390 with SMTP id a11-20020a170902eccb00b001d8deb53390mr350389plh.42.1707959492712; Wed, 14 Feb 2024 17:11:32 -0800 (PST) Received: from ewlu.ba.rivosinc.com ([64.71.180.162]) by smtp.gmail.com with ESMTPSA id 21-20020a170902c25500b001d8f12b0009sm60611plg.293.2024.02.14.17.11.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 17:11:32 -0800 (PST) From: Edwin Lu To: gcc-patches@gcc.gnu.org Cc: gnu-toolchain@rivosinc.com, Edwin Lu Subject: [PATCH V4 4/5] RISC-V: Quick and simple fixes to testcases that break due to reordering Date: Wed, 14 Feb 2024 17:11:20 -0800 Message-Id: <20240215011121.2434218-5-ewlu@rivosinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240215011121.2434218-1-ewlu@rivosinc.com> References: <20240215011121.2434218-1-ewlu@rivosinc.com> MIME-Version: 1.0 X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, KAM_SHORT, 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+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790925504543923881 X-GMAIL-MSGID: 1790925504543923881 The following test cases are easily fixed with small updates to the expected assembly order. Additionally make calling-convention testcases more robust PR target/113249 gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/vls/calling-convention-1.c: update * gcc.target/riscv/rvv/autovec/vls/calling-convention-2.c: ditto * gcc.target/riscv/rvv/autovec/vls/calling-convention-3.c: ditto * gcc.target/riscv/rvv/autovec/vls/calling-convention-4.c: ditto * gcc.target/riscv/rvv/autovec/vls/calling-convention-5.c: ditto * gcc.target/riscv/rvv/autovec/vls/calling-convention-6.c: ditto * gcc.target/riscv/rvv/autovec/vls/calling-convention-7.c: ditto * gcc.target/riscv/rvv/base/binop_vx_constraint-12.c: reorder assembly * gcc.target/riscv/rvv/base/binop_vx_constraint-16.c: ditto * gcc.target/riscv/rvv/base/binop_vx_constraint-17.c: ditto * gcc.target/riscv/rvv/base/binop_vx_constraint-19.c: ditto * gcc.target/riscv/rvv/base/binop_vx_constraint-21.c: ditto * gcc.target/riscv/rvv/base/binop_vx_constraint-23.c: ditto * gcc.target/riscv/rvv/base/binop_vx_constraint-25.c: ditto * gcc.target/riscv/rvv/base/binop_vx_constraint-27.c: ditto * gcc.target/riscv/rvv/base/binop_vx_constraint-29.c: ditto * gcc.target/riscv/rvv/base/binop_vx_constraint-31.c: ditto * gcc.target/riscv/rvv/base/binop_vx_constraint-33.c: ditto * gcc.target/riscv/rvv/base/binop_vx_constraint-35.c: ditto * gcc.target/riscv/rvv/base/binop_vx_constraint-4.c: ditto * gcc.target/riscv/rvv/base/binop_vx_constraint-40.c: ditto * gcc.target/riscv/rvv/base/binop_vx_constraint-44.c: ditto * gcc.target/riscv/rvv/base/binop_vx_constraint-8.c: ditto * gcc.target/riscv/rvv/base/shift_vx_constraint-1.c: ditto * gcc.target/riscv/rvv/vsetvl/avl_single-107.c: change expected vsetvl Signed-off-by: Edwin Lu Signed-off-by: Edwin Lu --- V1-3: - Patch did not exist V4: - New patch - improve calling-convention testcases (calling-conventions) - reorder expected function body assembly (binop/shift_vx_constraint) - change expected value (avl_single) --- .../rvv/autovec/vls/calling-convention-1.c | 27 ++++++++++++++++--- .../rvv/autovec/vls/calling-convention-2.c | 23 ++++++++++++++-- .../rvv/autovec/vls/calling-convention-3.c | 18 ++++++++++++- .../rvv/autovec/vls/calling-convention-4.c | 12 ++++++++- .../rvv/autovec/vls/calling-convention-5.c | 22 ++++++++++++++- .../rvv/autovec/vls/calling-convention-6.c | 17 ++++++++++++ .../rvv/autovec/vls/calling-convention-7.c | 12 ++++++++- .../riscv/rvv/base/binop_vx_constraint-12.c | 4 +-- .../riscv/rvv/base/binop_vx_constraint-16.c | 4 +-- .../riscv/rvv/base/binop_vx_constraint-17.c | 4 +-- .../riscv/rvv/base/binop_vx_constraint-19.c | 4 +-- .../riscv/rvv/base/binop_vx_constraint-21.c | 4 +-- .../riscv/rvv/base/binop_vx_constraint-23.c | 4 +-- .../riscv/rvv/base/binop_vx_constraint-25.c | 4 +-- .../riscv/rvv/base/binop_vx_constraint-27.c | 4 +-- .../riscv/rvv/base/binop_vx_constraint-29.c | 4 +-- .../riscv/rvv/base/binop_vx_constraint-31.c | 4 +-- .../riscv/rvv/base/binop_vx_constraint-33.c | 4 +-- .../riscv/rvv/base/binop_vx_constraint-35.c | 4 +-- .../riscv/rvv/base/binop_vx_constraint-4.c | 4 +-- .../riscv/rvv/base/binop_vx_constraint-40.c | 4 +-- .../riscv/rvv/base/binop_vx_constraint-44.c | 4 +-- .../riscv/rvv/base/binop_vx_constraint-8.c | 4 +-- .../riscv/rvv/base/shift_vx_constraint-1.c | 5 +--- .../riscv/rvv/vsetvl/avl_single-107.c | 2 +- 25 files changed, 140 insertions(+), 62 deletions(-) diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/calling-convention-1.c b/gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/calling-convention-1.c index 41e31c258f8..217885c2d67 100644 --- a/gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/calling-convention-1.c +++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/calling-convention-1.c @@ -143,12 +143,33 @@ DEF_RET1_ARG9 (v1024qi) DEF_RET1_ARG9 (v2048qi) DEF_RET1_ARG9 (v4096qi) +// RET1_ARG0 tests /* { dg-final { scan-assembler-times {li\s+a[0-1],\s*0} 9 } } */ +/* { dg-final { scan-assembler-times {mv\s+s0,a0\s+call\s+memset\s+mv\s+a0,s0} 3 } } */ + +// v1qi tests: return value (lbu) and function prologue (sb) +// 1 lbu per test, argnum sb's when args > 1 /* { dg-final { scan-assembler-times {lbu\s+a0,\s*[0-9]+\(sp\)} 8 } } */ -/* { dg-final { scan-assembler-times {lhu\s+a0,\s*[0-9]+\(sp\)} 8 } } */ -/* { dg-final { scan-assembler-times {lw\s+a0,\s*[0-9]+\(sp\)} 8 } } */ -/* { dg-final { scan-assembler-times {ld\s+a[0-1],\s*[0-9]+\(sp\)} 35 } } */ /* { dg-final { scan-assembler-times {sb\s+a[0-7],\s*[0-9]+\(sp\)} 43 } } */ + +// v2qi test: return value (lhu) and function prologue (sh) +// 1 lhu per test, argnum sh's when args > 1 +/* { dg-final { scan-assembler-times {lhu\s+a0,\s*[0-9]+\(sp\)} 8 } } */ /* { dg-final { scan-assembler-times {sh\s+a[0-7],\s*[0-9]+\(sp\)} 43 } } */ + +// v4qi tests: return value (lw) and function prologue (sw) +// 1 lw per test, argnum sw's when args > 1 +/* { dg-final { scan-assembler-times {lw\s+a0,\s*[0-9]+\(sp\)} 8 } } */ /* { dg-final { scan-assembler-times {sw\s+a[0-7],\s*[0-9]+\(sp\)} 43 } } */ + +// v8qi and v16qi tests: return value (ld) and function prologue (sd) +// - 1 ld per v8qi and 2 ld per v16qi with args > 1 +// - 2 * argnum sd's per v8qi and 3 * argnum sd's per v16qi when argnum > 1 +/* { dg-final { scan-assembler-times {ld\s+a[0-1],\s*[0-9]+\(sp\)} 24 } } */ /* { dg-final { scan-assembler-times {sd\s+a[0-7],\s*[0-9]+\(sp\)} 103 } } */ + +// v32-4096qi tests: return value (vse8.v) +/* { dg-final { scan-assembler-times {vse8.v\s+v[0-9],\s*[0-9]+\(a0\)} 74 } } */ +// v1024-4096qi_ARG1 tests: return value (vse64.v) +// for some reason ARG1 returns using vse64 instead of vse8 +/* { dg-final { scan-assembler-times {vse64.v\s+v[0-9],\s*[0-9]+\(a0\)\s+ret} 3 } } */ diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/calling-convention-2.c b/gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/calling-convention-2.c index 8544f160e93..f45e6a74c88 100644 --- a/gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/calling-convention-2.c +++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/calling-convention-2.c @@ -133,10 +133,29 @@ DEF_RET1_ARG9 (v512hi) DEF_RET1_ARG9 (v1024hi) DEF_RET1_ARG9 (v2048hi) +// RET1_ARG0 tests /* { dg-final { scan-assembler-times {li\s+a[0-1],\s*0} 8 } } */ +/* { dg-final { scan-assembler-times {mv\s+s0,a0\s+call\s+memset\s+mv\s+a0,s0} 3 } } */ + +// v1hi tests: return value (lhu) and function prologue (sh) +// 1 lhu per test, argnum sh's when args > 1 /* { dg-final { scan-assembler-times {lhu\s+a0,\s*[0-9]+\(sp\)} 8 } } */ -/* { dg-final { scan-assembler-times {lw\s+a0,\s*[0-9]+\(sp\)} 8 } } */ -/* { dg-final { scan-assembler-times {ld\s+a[0-1],\s*[0-9]+\(sp\)} 33 } } */ /* { dg-final { scan-assembler-times {sh\s+a[0-7],\s*[0-9]+\(sp\)} 43 } } */ + +// v2hi tests: return value (lw) and function prologue (sw) +// 1 lw per test, argnum sw's when args > 1 +/* { dg-final { scan-assembler-times {lw\s+a0,\s*[0-9]+\(sp\)} 8 } } */ /* { dg-final { scan-assembler-times {sw\s+a[0-7],\s*[0-9]+\(sp\)} 43 } } */ + +// v4hi and v8hi tests: return value (ld) and function prologue (sd) +// - 1 ld per v4hi and 2 ld per v8hi with args > 1 +// - argnum sd's per v4hi when argnum > 1 +// - 2 * argnum sd's per v8hi when argnum > 0 +/* { dg-final { scan-assembler-times {ld\s+a[0-1],\s*[0-9]+\(sp\)} 24 } } */ /* { dg-final { scan-assembler-times {sd\s+a[0-7],\s*[0-9]+\(sp\)} 103 } } */ + +// v16-2048hi tests: return value (vse16.v) +/* { dg-final { scan-assembler-times {vse16.v\s+v[0-9],\s*[0-9]+\(a0\)} 74 } } */ +// v512-2048qi_ARG1 tests: return value (vse64.v) +// for some reason ARG1 returns using vse64 instead of vse16 +/* { dg-final { scan-assembler-times {vse64.v\s+v[0-9],\s*[0-9]+\(a0\)\s+ret} 3 } } */ diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/calling-convention-3.c b/gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/calling-convention-3.c index 17b06933c72..6716b0aa413 100644 --- a/gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/calling-convention-3.c +++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/calling-convention-3.c @@ -123,8 +123,24 @@ DEF_RET1_ARG9 (v256si) DEF_RET1_ARG9 (v512si) DEF_RET1_ARG9 (v1024si) +// RET1_ARG0 tests /* { dg-final { scan-assembler-times {li\s+a[0-1],\s*0} 7 } } */ +/* { dg-final { scan-assembler-times {mv\s+s0,a0\s+call\s+memset\s+mv\s+a0,s0} 3 } } */ + +// v1si tests: return value (lw) and function prologue (sw) +// 1 lw per test, argnum sw's when args > 1 /* { dg-final { scan-assembler-times {lw\s+a0,\s*[0-9]+\(sp\)} 8 } } */ -/* { dg-final { scan-assembler-times {ld\s+a[0-1],\s*[0-9]+\(sp\)} 31 } } */ /* { dg-final { scan-assembler-times {sw\s+a[0-7],\s*[0-9]+\(sp\)} 43 } } */ + +// v2si and v4si tests: return value (ld) and function prologue (sd) +// - 1 ld per v2si and 2 ld per v4si with args > 1 +// - argnum sd's per v2si when argnum > 1 +// - 2 * argnum sd's per v4si when argnum > 0 +/* { dg-final { scan-assembler-times {ld\s+a[0-1],\s*[0-9]+\(sp\)} 24 } } */ /* { dg-final { scan-assembler-times {sd\s+a[0-7],\s*[0-9]+\(sp\)} 103 } } */ + +// v8-1024si tests: return value (vse32.v) +/* { dg-final { scan-assembler-times {vse32.v\s+v[0-9],\s*[0-9]+\(a0\)} 74 } } */ +// 256-1024si tests: return value (vse64.v) +// for some reason ARG1 returns using vse64 instead of vse32 +/* { dg-final { scan-assembler-times {vse64.v\s+v[0-9],\s*[0-9]+\(a0\)\s+ret} 3 } } */ diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/calling-convention-4.c b/gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/calling-convention-4.c index 8c3f6ba98e3..0a649acea9e 100644 --- a/gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/calling-convention-4.c +++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/calling-convention-4.c @@ -113,6 +113,16 @@ DEF_RET1_ARG9 (v128di) DEF_RET1_ARG9 (v256di) DEF_RET1_ARG9 (v512di) +// RET1_ARG0 tests /* { dg-final { scan-assembler-times {li\s+a[0-1],\s*0} 6 } } */ -/* { dg-final { scan-assembler-times {ld\s+a[0-1],\s*[0-9]+\(sp\)} 29 } } */ +/* { dg-final { scan-assembler-times {mv\s+s0,a0\s+call\s+memset\s+mv\s+a0,s0} 3 } } */ + +// v1di and v2di tests: return value (ld) and function prologue (sd) +// - 1 ld per v1di and 2 ld per v2di with args > 1 +// - argnum sd's per v1di when argnum > 1 +// - 2 * argnum sd's per v2di when argnum > 0 +/* { dg-final { scan-assembler-times {ld\s+a[0-1],\s*[0-9]+\(sp\)} 24 } } */ /* { dg-final { scan-assembler-times {sd\s+a[0-7],\s*[0-9]+\(sp\)} 103 } } */ + +// v4-512di tests: return value (vse64.v) +/* { dg-final { scan-assembler-times {vse64.v\s+v[0-9],\s*[0-9]+\(a0\)} 77 } } */ diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/calling-convention-5.c b/gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/calling-convention-5.c index a0208d8f42b..fd5146f5e6b 100644 --- a/gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/calling-convention-5.c +++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/calling-convention-5.c @@ -133,9 +133,29 @@ DEF_RET1_ARG9 (v512hf) DEF_RET1_ARG9 (v1024hf) DEF_RET1_ARG9 (v2048hf) +// RET1_ARG0 tests /* { dg-final { scan-assembler-times {li\s+a[0-1],\s*0} 8 } } */ +/* { dg-final { scan-assembler-times {mv\s+s0,a0\s+call\s+memset\s+mv\s+a0,s0} 3 } } */ + +// v1hf tests: return value (lhu) and function prologue (sh) +// 1 lhu per test, argnum sh's when args > 1 /* { dg-final { scan-assembler-times {lhu\s+a[0-1],\s*[0-9]+\(sp\)} 8 } } */ -/* { dg-final { scan-assembler-times {lw\s+a[0-1],\s*[0-9]+\(sp\)} 8 } } */ /* { dg-final { scan-assembler-times {sh\s+a[0-7],\s*[0-9]+\(sp\)} 43 } } */ + +// v2hf tests: return value (lw) and function prologue (sw) +// 1 lw per test, argnum sw's when args > 1 +/* { dg-final { scan-assembler-times {lw\s+a[0-1],\s*[0-9]+\(sp\)} 8 } } */ /* { dg-final { scan-assembler-times {sw\s+a[0-7],\s*[0-9]+\(sp\)} 43 } } */ + +// v4hf and v8hf tests: return value (ld) and function prologue (sd) +// - 1 ld per v4hf and 2 ld per v8hf with args > 1 +// - argnum sd's per v4hf when argnum > 1 +// - 2 * argnum sd's per v8hf when argnum > 0 +/* { dg-final { scan-assembler-times {ld\s+a[0-1],\s*[0-9]+\(sp\)} 24 } } */ /* { dg-final { scan-assembler-times {sd\s+a[0-7],\s*[0-9]+\(sp\)} 103 } } */ + +// v16-2048hf tests: return value (vse16.v) +/* { dg-final { scan-assembler-times {vse16.v\s+v[0-9],\s*[0-9]+\(a0\)} 74 } } */ +// v512-2048qf_ARG1 tests: return value (vse64.v) +// for some reason ARG1 returns using vse64 instead of vse16 +/* { dg-final { scan-assembler-times {vse64.v\s+v[0-9],\s*[0-9]+\(a0\)\s+ret} 3 } } */ diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/calling-convention-6.c b/gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/calling-convention-6.c index 58ef8bf65f3..4723312ec09 100644 --- a/gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/calling-convention-6.c +++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/calling-convention-6.c @@ -123,7 +123,24 @@ DEF_RET1_ARG9 (v256sf) DEF_RET1_ARG9 (v512sf) DEF_RET1_ARG9 (v1024sf) +// RET1_ARG0 tests /* { dg-final { scan-assembler-times {li\s+a[0-1],\s*0} 7 } } */ +/* { dg-final { scan-assembler-times {mv\s+s0,a0\s+call\s+memset\s+mv\s+a0,s0} 3 } } */ + +// v1sf tests: return value (lw) and function prologue (sw) +// 1 lw per test, argnum sw's when args > 1 /* { dg-final { scan-assembler-times {lw\s+a[0-1],\s*[0-9]+\(sp\)} 8 } } */ /* { dg-final { scan-assembler-times {sw\s+a[0-7],\s*[0-9]+\(sp\)} 43 } } */ + +// v2sf and v4sf tests: return value (ld) and function prologue (sd) +// - 1 ld per v2sf and 2 ld per v4sf with args > 1 +// - argnum sd's per v2sf when argnum > 1 +// - 2 * argnum sd's per v4sf when argnum > 0 +/* { dg-final { scan-assembler-times {ld\s+a[0-1],\s*[0-9]+\(sp\)} 24 } } */ /* { dg-final { scan-assembler-times {sd\s+a[0-7],\s*[0-9]+\(sp\)} 103 } } */ + +// v8-1024sf tests: return value (vse32.v) +/* { dg-final { scan-assembler-times {vse32.v\s+v[0-9],\s*[0-9]+\(a0\)} 74 } } */ +// 256-1024sf tests: return value (vse64.v) +// for some reason ARG1 returns using vse64 instead of vse32 +/* { dg-final { scan-assembler-times {vse64.v\s+v[0-9],\s*[0-9]+\(a0\)\s+ret} 3 } } */ diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/calling-convention-7.c b/gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/calling-convention-7.c index e35ccd52e51..40e1b93bf55 100644 --- a/gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/calling-convention-7.c +++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/calling-convention-7.c @@ -113,6 +113,16 @@ DEF_RET1_ARG9 (v128df) DEF_RET1_ARG9 (v256df) DEF_RET1_ARG9 (v512df) +// RET1_ARG0 tests /* { dg-final { scan-assembler-times {li\s+a[0-1],\s*0} 6 } } */ -/* { dg-final { scan-assembler-times {ld\s+a[0-1],\s*[0-9]+\(sp\)} 29 } } */ +/* { dg-final { scan-assembler-times {mv\s+s0,a0\s+call\s+memset\s+mv\s+a0,s0} 3 } } */ + +// v1df and v2df tests: return value (ld) and function prologue (sd) +// - 1 ld per v1df and 2 ld per v2df with args > 1 +// - argnum sd's per v1df when argnum > 1 +// - 2 * argnum sd's per v2df when argnum > 0 +/* { dg-final { scan-assembler-times {ld\s+a[0-1],\s*[0-9]+\(sp\)} 24 } } */ /* { dg-final { scan-assembler-times {sd\s+a[0-7],\s*[0-9]+\(sp\)} 103 } } */ + +// v4-512df tests: return value (vse64.v) +/* { dg-final { scan-assembler-times {vse64.v\s+v[0-9],\s*[0-9]+\(a0\)} 77 } } */ diff --git a/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-12.c b/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-12.c index 173ac625ada..9a3327cde23 100644 --- a/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-12.c +++ b/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-12.c @@ -1,7 +1,5 @@ /* { dg-do compile } */ /* { dg-options "-march=rv32gcv -mabi=ilp32d -O3" } */ -// PR113249 -/* { dg-additional-options "-fno-schedule-insns -fno-schedule-insns2" } */ /* { dg-final { check-function-bodies "**" "" } } */ #include "riscv_vector.h" @@ -122,8 +120,8 @@ void f5 (void * in, void *out, int8_t x) ** f6: ** ... ** vlm.v\tv[0-9]+,0\([a-x0-9]+\) -** ... ** vle8\.v\tv[0-9]+,0\([a-x0-9]+\) +** ... ** vle8.v\tv[0-9]+,0\([a-x0-9]+\),v0.t ** vand\.vx\tv[0-9]+,\s*v[0-9]+,\s*[a-x0-9]+ ** vand\.vx\tv[1-9][0-9]?,\s*v[0-9]+,\s*[a-x0-9]+,\s*v0.t diff --git a/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-16.c b/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-16.c index 1edba8980b4..e83187dd1d3 100644 --- a/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-16.c +++ b/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-16.c @@ -1,7 +1,5 @@ /* { dg-do compile } */ /* { dg-options "-march=rv32gcv -mabi=ilp32d -O3" } */ -// PR113249 -/* { dg-additional-options "-fno-schedule-insns -fno-schedule-insns2" } */ /* { dg-final { check-function-bodies "**" "" } } */ #include "riscv_vector.h" @@ -122,8 +120,8 @@ void f5 (void * in, void *out, int8_t x) ** f6: ** ... ** vlm.v\tv[0-9]+,0\([a-x0-9]+\) -** ... ** vle8\.v\tv[0-9]+,0\([a-x0-9]+\) +** ... ** vle8.v\tv[0-9]+,0\([a-x0-9]+\),v0.t ** vor\.vx\tv[0-9]+,\s*v[0-9]+,\s*[a-x0-9]+ ** vor\.vx\tv[1-9][0-9]?,\s*v[0-9]+,\s*[a-x0-9]+,\s*v0.t diff --git a/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-17.c b/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-17.c index 75340c3da6c..9321b8f474d 100644 --- a/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-17.c +++ b/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-17.c @@ -1,7 +1,5 @@ /* { dg-do compile } */ /* { dg-options "-march=rv32gcv -mabi=ilp32d -O3" } */ -// PR113249 -/* { dg-additional-options "-fno-schedule-insns -fno-schedule-insns2" } */ /* { dg-final { check-function-bodies "**" "" } } */ #include "riscv_vector.h" @@ -122,8 +120,8 @@ void f5 (void * in, void *out, int8_t x) ** f6: ** ... ** vlm.v\tv[0-9]+,0\([a-x0-9]+\) -** ... ** vle8\.v\tv[0-9]+,0\([a-x0-9]+\) +** ... ** vle8.v\tv[0-9]+,0\([a-x0-9]+\),v0.t ** vmul\.vx\tv[0-9]+,\s*v[0-9]+,\s*[a-x0-9]+ ** vmul\.vx\tv[1-9][0-9]?,\s*v[0-9]+,\s*[a-x0-9]+,\s*v0.t diff --git a/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-19.c b/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-19.c index 7e4aedc1cdc..9a64c133dbc 100644 --- a/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-19.c +++ b/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-19.c @@ -1,7 +1,5 @@ /* { dg-do compile } */ /* { dg-options "-march=rv32gcv -mabi=ilp32d -O3" } */ -// PR113249 -/* { dg-additional-options "-fno-schedule-insns -fno-schedule-insns2" } */ /* { dg-final { check-function-bodies "**" "" } } */ #include "riscv_vector.h" @@ -122,8 +120,8 @@ void f5 (void * in, void *out, int8_t x) ** f6: ** ... ** vlm.v\tv[0-9]+,0\([a-x0-9]+\) -** ... ** vle8\.v\tv[0-9]+,0\([a-x0-9]+\) +** ... ** vle8.v\tv[0-9]+,0\([a-x0-9]+\),v0.t ** vmax\.vx\tv[0-9]+,\s*v[0-9]+,\s*[a-x0-9]+ ** vmax\.vx\tv[1-9][0-9]?,\s*v[0-9]+,\s*[a-x0-9]+,\s*v0.t diff --git a/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-21.c b/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-21.c index 755e92a9cd7..93249b2c92d 100644 --- a/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-21.c +++ b/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-21.c @@ -1,7 +1,5 @@ /* { dg-do compile } */ /* { dg-options "-march=rv32gcv -mabi=ilp32d -O3" } */ -// PR113249 -/* { dg-additional-options "-fno-schedule-insns -fno-schedule-insns2" } */ /* { dg-final { check-function-bodies "**" "" } } */ #include "riscv_vector.h" @@ -122,8 +120,8 @@ void f5 (void * in, void *out, int8_t x) ** f6: ** ... ** vlm.v\tv[0-9]+,0\([a-x0-9]+\) -** ... ** vle8\.v\tv[0-9]+,0\([a-x0-9]+\) +** ... ** vle8.v\tv[0-9]+,0\([a-x0-9]+\),v0.t ** vmin\.vx\tv[0-9]+,\s*v[0-9]+,\s*[a-x0-9]+ ** vmin\.vx\tv[1-9][0-9]?,\s*v[0-9]+,\s*[a-x0-9]+,\s*v0.t diff --git a/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-23.c b/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-23.c index 2c82dc0688a..0d6cb4ffca0 100644 --- a/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-23.c +++ b/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-23.c @@ -1,7 +1,5 @@ /* { dg-do compile } */ /* { dg-options "-march=rv32gcv -mabi=ilp32d -O3" } */ -// PR113249 -/* { dg-additional-options "-fno-schedule-insns -fno-schedule-insns2" } */ /* { dg-final { check-function-bodies "**" "" } } */ #include "riscv_vector.h" @@ -122,8 +120,8 @@ void f5 (void * in, void *out, int8_t x) ** f6: ** ... ** vlm.v\tv[0-9]+,0\([a-x0-9]+\) -** ... ** vle8\.v\tv[0-9]+,0\([a-x0-9]+\) +** ... ** vle8.v\tv[0-9]+,0\([a-x0-9]+\),v0.t ** vmaxu\.vx\tv[0-9]+,\s*v[0-9]+,\s*[a-x0-9]+ ** vmaxu\.vx\tv[1-9][0-9]?,\s*v[0-9]+,\s*[a-x0-9]+,\s*v0.t diff --git a/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-25.c b/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-25.c index e2ac6a3d9e1..228359df2d6 100644 --- a/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-25.c +++ b/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-25.c @@ -1,7 +1,5 @@ /* { dg-do compile } */ /* { dg-options "-march=rv32gcv -mabi=ilp32d -O3" } */ -// PR113249 -/* { dg-additional-options "-fno-schedule-insns -fno-schedule-insns2" } */ /* { dg-final { check-function-bodies "**" "" } } */ #include "riscv_vector.h" @@ -122,8 +120,8 @@ void f5 (void * in, void *out, int8_t x) ** f6: ** ... ** vlm.v\tv[0-9]+,0\([a-x0-9]+\) -** ... ** vle8\.v\tv[0-9]+,0\([a-x0-9]+\) +** ... ** vle8.v\tv[0-9]+,0\([a-x0-9]+\),v0.t ** vminu\.vx\tv[0-9]+,\s*v[0-9]+,\s*[a-x0-9]+ ** vminu\.vx\tv[1-9][0-9]?,\s*v[0-9]+,\s*[a-x0-9]+,\s*v0.t diff --git a/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-27.c b/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-27.c index 436a0e85f3d..1960afbc2ee 100644 --- a/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-27.c +++ b/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-27.c @@ -1,7 +1,5 @@ /* { dg-do compile } */ /* { dg-options "-march=rv32gcv -mabi=ilp32d -O3" } */ -// PR113249 -/* { dg-additional-options "-fno-schedule-insns -fno-schedule-insns2" } */ /* { dg-final { check-function-bodies "**" "" } } */ #include "riscv_vector.h" @@ -122,8 +120,8 @@ void f5 (void * in, void *out, int8_t x) ** f6: ** ... ** vlm.v\tv[0-9]+,0\([a-x0-9]+\) -** ... ** vle8\.v\tv[0-9]+,0\([a-x0-9]+\) +** ... ** vle8.v\tv[0-9]+,0\([a-x0-9]+\),v0.t ** vdiv\.vx\tv[0-9]+,\s*v[0-9]+,\s*[a-x0-9]+ ** vdiv\.vx\tv[1-9][0-9]?,\s*v[0-9]+,\s*[a-x0-9]+,\s*v0.t diff --git a/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-29.c b/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-29.c index 72b321607c3..6d2c07403fd 100644 --- a/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-29.c +++ b/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-29.c @@ -1,7 +1,5 @@ /* { dg-do compile } */ /* { dg-options "-march=rv32gcv -mabi=ilp32d -O3" } */ -// PR113249 -/* { dg-additional-options "-fno-schedule-insns -fno-schedule-insns2" } */ /* { dg-final { check-function-bodies "**" "" } } */ #include "riscv_vector.h" @@ -122,8 +120,8 @@ void f5 (void * in, void *out, int8_t x) ** f6: ** ... ** vlm.v\tv[0-9]+,0\([a-x0-9]+\) -** ... ** vle8\.v\tv[0-9]+,0\([a-x0-9]+\) +** ... ** vle8.v\tv[0-9]+,0\([a-x0-9]+\),v0.t ** vdivu\.vx\tv[0-9]+,\s*v[0-9]+,\s*[a-x0-9]+ ** vdivu\.vx\tv[1-9][0-9]?,\s*v[0-9]+,\s*[a-x0-9]+,\s*v0.t diff --git a/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-31.c b/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-31.c index 72b321607c3..6d2c07403fd 100644 --- a/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-31.c +++ b/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-31.c @@ -1,7 +1,5 @@ /* { dg-do compile } */ /* { dg-options "-march=rv32gcv -mabi=ilp32d -O3" } */ -// PR113249 -/* { dg-additional-options "-fno-schedule-insns -fno-schedule-insns2" } */ /* { dg-final { check-function-bodies "**" "" } } */ #include "riscv_vector.h" @@ -122,8 +120,8 @@ void f5 (void * in, void *out, int8_t x) ** f6: ** ... ** vlm.v\tv[0-9]+,0\([a-x0-9]+\) -** ... ** vle8\.v\tv[0-9]+,0\([a-x0-9]+\) +** ... ** vle8.v\tv[0-9]+,0\([a-x0-9]+\),v0.t ** vdivu\.vx\tv[0-9]+,\s*v[0-9]+,\s*[a-x0-9]+ ** vdivu\.vx\tv[1-9][0-9]?,\s*v[0-9]+,\s*[a-x0-9]+,\s*v0.t diff --git a/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-33.c b/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-33.c index 6908c78e19b..4b2a6c03f42 100644 --- a/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-33.c +++ b/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-33.c @@ -1,7 +1,5 @@ /* { dg-do compile } */ /* { dg-options "-march=rv32gcv -mabi=ilp32d -O3" } */ -// PR113249 -/* { dg-additional-options "-fno-schedule-insns -fno-schedule-insns2" } */ /* { dg-final { check-function-bodies "**" "" } } */ #include "riscv_vector.h" @@ -122,8 +120,8 @@ void f5 (void * in, void *out, int8_t x) ** f6: ** ... ** vlm.v\tv[0-9]+,0\([a-x0-9]+\) -** ... ** vle8\.v\tv[0-9]+,0\([a-x0-9]+\) +** ... ** vle8.v\tv[0-9]+,0\([a-x0-9]+\),v0.t ** vremu\.vx\tv[0-9]+,\s*v[0-9]+,\s*[a-x0-9]+ ** vremu\.vx\tv[1-9][0-9]?,\s*v[0-9]+,\s*[a-x0-9]+,\s*v0.t diff --git a/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-35.c b/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-35.c index 6908c78e19b..4b2a6c03f42 100644 --- a/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-35.c +++ b/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-35.c @@ -1,7 +1,5 @@ /* { dg-do compile } */ /* { dg-options "-march=rv32gcv -mabi=ilp32d -O3" } */ -// PR113249 -/* { dg-additional-options "-fno-schedule-insns -fno-schedule-insns2" } */ /* { dg-final { check-function-bodies "**" "" } } */ #include "riscv_vector.h" @@ -122,8 +120,8 @@ void f5 (void * in, void *out, int8_t x) ** f6: ** ... ** vlm.v\tv[0-9]+,0\([a-x0-9]+\) -** ... ** vle8\.v\tv[0-9]+,0\([a-x0-9]+\) +** ... ** vle8.v\tv[0-9]+,0\([a-x0-9]+\),v0.t ** vremu\.vx\tv[0-9]+,\s*v[0-9]+,\s*[a-x0-9]+ ** vremu\.vx\tv[1-9][0-9]?,\s*v[0-9]+,\s*[a-x0-9]+,\s*v0.t diff --git a/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-4.c b/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-4.c index ee1db1c41ae..cebe6a61fe5 100644 --- a/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-4.c +++ b/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-4.c @@ -1,7 +1,5 @@ /* { dg-do compile } */ /* { dg-options "-march=rv32gcv -mabi=ilp32d -O3" } */ -// PR113249 -/* { dg-additional-options "-fno-schedule-insns -fno-schedule-insns2" } */ /* { dg-final { check-function-bodies "**" "" } } */ #include "riscv_vector.h" @@ -122,8 +120,8 @@ void f5 (void * in, void *out, int8_t x) ** f6: ** ... ** vlm.v\tv[0-9]+,0\([a-x0-9]+\) -** ... ** vle8\.v\tv[0-9]+,0\([a-x0-9]+\) +** ... ** vle8.v\tv[0-9]+,0\([a-x0-9]+\),v0.t ** vadd\.vx\tv[0-9]+,\s*v[0-9]+,\s*[a-x0-9]+ ** vadd\.vx\tv[1-9][0-9]?,\s*v[0-9]+,\s*[a-x0-9]+,\s*v0.t diff --git a/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-40.c b/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-40.c index fb969eb50a2..4379310f479 100644 --- a/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-40.c +++ b/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-40.c @@ -1,7 +1,5 @@ /* { dg-do compile } */ /* { dg-options "-march=rv32gcv -mabi=ilp32d -O3" } */ -// PR113249 -/* { dg-additional-options "-fno-schedule-insns -fno-schedule-insns2" } */ /* { dg-final { check-function-bodies "**" "" } } */ #include "riscv_vector.h" @@ -122,8 +120,8 @@ void f5 (void * in, void *out, int8_t x) ** f6: ** ... ** vlm.v\tv[0-9]+,0\([a-x0-9]+\) -** ... ** vle8\.v\tv[0-9]+,0\([a-x0-9]+\) +** ... ** vle8.v\tv[0-9]+,0\([a-x0-9]+\),v0.t ** vadd\.vx\tv[0-9]+,\s*v[0-9]+,\s*[a-x0-9]+ ** vadd\.vx\tv[1-9][0-9]?,\s*v[0-9]+,\s*[a-x0-9]+,\s*v0.t diff --git a/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-44.c b/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-44.c index 542f43eca49..806d9db46af 100644 --- a/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-44.c +++ b/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-44.c @@ -1,7 +1,5 @@ /* { dg-do compile } */ /* { dg-options "-march=rv32gcv -mabi=ilp32d -O3" } */ -// PR113249 -/* { dg-additional-options "-fno-schedule-insns -fno-schedule-insns2" } */ /* { dg-final { check-function-bodies "**" "" } } */ #include "riscv_vector.h" @@ -122,8 +120,8 @@ void f5 (void * in, void *out, int8_t x) ** f6: ** ... ** vlm.v\tv[0-9]+,0\([a-x0-9]+\) -** ... ** vle8\.v\tv[0-9]+,0\([a-x0-9]+\) +** ... ** vle8.v\tv[0-9]+,0\([a-x0-9]+\),v0.t ** vrsub\.vx\tv[0-9]+,\s*v[0-9]+,\s*[a-x0-9]+ ** vrsub\.vx\tv[1-9][0-9]?,\s*v[0-9]+,\s*[a-x0-9]+,\s*v0.t diff --git a/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-8.c b/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-8.c index 6a26248096d..83d50711540 100644 --- a/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-8.c +++ b/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-8.c @@ -1,7 +1,5 @@ /* { dg-do compile } */ /* { dg-options "-march=rv32gcv -mabi=ilp32d -O3" } */ -// PR113249 -/* { dg-additional-options "-fno-schedule-insns -fno-schedule-insns2" } */ /* { dg-final { check-function-bodies "**" "" } } */ #include "riscv_vector.h" @@ -122,8 +120,8 @@ void f5 (void * in, void *out, int8_t x) ** f6: ** ... ** vlm.v\tv[0-9]+,0\([a-x0-9]+\) -** ... ** vle8\.v\tv[0-9]+,0\([a-x0-9]+\) +** ... ** vle8.v\tv[0-9]+,0\([a-x0-9]+\),v0.t ** vxor\.vx\tv[0-9]+,\s*v[0-9]+,\s*[a-x0-9]+ ** vxor\.vx\tv[1-9][0-9]?,\s*v[0-9]+,\s*[a-x0-9]+,\s*v0.t diff --git a/gcc/testsuite/gcc.target/riscv/rvv/base/shift_vx_constraint-1.c b/gcc/testsuite/gcc.target/riscv/rvv/base/shift_vx_constraint-1.c index 9e0b41ccba7..622c890d71b 100644 --- a/gcc/testsuite/gcc.target/riscv/rvv/base/shift_vx_constraint-1.c +++ b/gcc/testsuite/gcc.target/riscv/rvv/base/shift_vx_constraint-1.c @@ -1,7 +1,5 @@ /* { dg-do compile } */ /* { dg-options "-march=rv32gcv -mabi=ilp32d -O3" } */ -// PR113249 -/* { dg-additional-options "-fno-schedule-insns -fno-schedule-insns2" } */ /* { dg-final { check-function-bodies "**" "" } } */ #include "riscv_vector.h" @@ -28,9 +26,8 @@ void f1 (void * in, void *out) ** f2: ** ... ** vlm.v\tv[0-9]+,0\([a-x0-9]+\) -** ... -** ... ** vle32.v\tv[0-9]+,0\([a-x0-9]+\),v0.t +** ... ** vsll\.vx\tv[0-9]+,\s*v[0-9]+,\s*[a-x0-9]+ ** vsll\.vx\tv[1-9][0-9]?,\s*v[0-9]+,\s*[a-x0-9]+,\s*v0.t ** vse32.v\tv[0-9]+,0\([a-x0-9]+\) diff --git a/gcc/testsuite/gcc.target/riscv/rvv/vsetvl/avl_single-107.c b/gcc/testsuite/gcc.target/riscv/rvv/vsetvl/avl_single-107.c index 2b5e9f778d7..7b8acc25399 100644 --- a/gcc/testsuite/gcc.target/riscv/rvv/vsetvl/avl_single-107.c +++ b/gcc/testsuite/gcc.target/riscv/rvv/vsetvl/avl_single-107.c @@ -38,4 +38,4 @@ foo (int vl, int n, int m, int32_t *in, int32_t *out) } /* { dg-final { scan-assembler-times {vsetvli} 4 { target { { any-opts "-O2" "-O3" } && { no-opts "-g" "-funroll-loops" } } } } } */ -/* { dg-final { scan-assembler-times {vsetvli\tzero,zero,e32,m1,t[au],m[au]} 1 { target { { any-opts "-O2" "-O3" } && { no-opts "-g" "-funroll-loops" } } } } } */ +/* { dg-final { scan-assembler-times {vsetvli\tzero,a0,e32,m1,t[au],m[au]} 1 { target { { any-opts "-O2" "-O3" } && { no-opts "-g" "-funroll-loops" } } } } } */