From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) by sourceware.org (Postfix) with ESMTPS id 662C33858C74 for ; Thu, 21 Sep 2023 11:25:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 662C33858C74 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=sifive.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=sifive.com Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-2c008042211so13476111fa.2 for ; Thu, 21 Sep 2023 04:25:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; t=1695295500; x=1695900300; darn=gcc.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=xRUyW7sAVt2k5FmJHKF+rNY/v6xm+hg69uGRESa6DC0=; b=LA3lZwxWobcHbt8Nihy1TpE+lMIKz9rQFf7Uu4VR47BA4Msilq6Uo1XIXbGDibmoBY s1AF4blxCKbD/QNG7AH8RKtPMitbwb800hSpjhi/S8z8LSfssf891y+/vS8zJKUdn9+9 bZ3qQ9rU++2ZxdURDs/zTINDOY/0iFpFdOx37VWVkCU6T7G905YW8885B7Pz/cXUKs+C tmmSxO5cLwuLoMTN7mDeu+bijTTNqfTEKy3XUOps4BpwnkvdVGsxCyAY+W10fsTE8Kmc MMnzX4HMDjoFjkZVs3fOf/Ji+957DhowB/1dwzw6T2+wJAODS27QM8mjpOlTqMfhDSfU 8JrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695295500; x=1695900300; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xRUyW7sAVt2k5FmJHKF+rNY/v6xm+hg69uGRESa6DC0=; b=j3YfcsfVKvSaaBeFAITiHrrKJocY9VUdCVVr1i52V8mxt00VMWfg4cMeWGtvdYXDry hBdANaWOuS6oUspn0ZNLR8bzULwJ4getIHu7ps4PzRcygofkuIn11WHwWsMLQUQJaWjk p/yuNOg0lmM3k0ZeS/B3K8TfBfSbd926CXBIuhPQykfj+IOliGVe1IzLBCSMD4aed2bl JE8lseblnrW8G9mnkr2/XRQBQw3JysXdxXNKMaEI/fh7Q+KsMx08F6b/W3tHIOds9EmX 6c3FQvFDIZjtGKTiZd67HKd8x1ekiEi8sTETV2cIdeOMnDkK/sjUGLOWr0dUov/TaOTq SKSg== X-Gm-Message-State: AOJu0YzWBRwgyJG13anSbYLUe3HrdgwWTp5WBnYJG4MyWTNJ++Oj2+2n zqtsonLyhkMCBf+bbEUqYj0Ax/D4JhdEl/d0TqP51A== X-Google-Smtp-Source: AGHT+IFjQWXlliu85FGN3zEPJXuUfwjWhYv47eTCqQBniFrWmdtslm1BFR16hUZPICZTfA3jgjbu6FejWA5hmI9mYMQ= X-Received: by 2002:a2e:9897:0:b0:2bf:ac97:df26 with SMTP id b23-20020a2e9897000000b002bfac97df26mr4915566ljj.25.1695295499877; Thu, 21 Sep 2023 04:24:59 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Kito Cheng Date: Thu, 21 Sep 2023 12:24:48 +0100 Message-ID: Subject: Re: [Committed] RISC-V: Support VLS unary floating-point patterns To: Palmer Dabbelt Cc: "Patrick O'Neill" , juzhe.zhong@rivai.ai, rdapp.gcc@gmail.com, gcc-patches@gcc.gnu.org, jeffreyalaw@gmail.com, ewlu@rivosinc.com, joern.rennecke@embecosm.com, jeremy.bennett@embecosm.com, gnu-toolchain@rivosinc.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-10.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: GCC has built in function[1] for those math function stuff, e.g. __builtin_ceilf, so we don't really need math.h :) [1] https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html On Thu, Sep 21, 2023 at 11:20=E2=80=AFAM Palmer Dabbelt wrote: > > On Wed, 20 Sep 2023 10:47:23 PDT (-0700), Patrick O'Neill wrote: > > Juzhe, > > > > On a more general note, are we expecting #include to cause a > > testcase to fail? > > > > My motivation is to make the testsuite less noisy when checking for > > regressions. For example, a patch like this one: > > https://patchwork.sourceware.org/project/gcc/patch/20230920023059.17281= 32-1-pan2.li@intel.com/ > > is showing 4 new failures on rv32gcv from the {dg-do compile} testcases > > that #include . I might be wrong, but those don't look like rea= l > > failures to me [1][2][3]. > > > > On glibc rv64gcv I'm seeing tests like: > > gcc.target/riscv/rvv/autovec/unop/vnot-rv32gcv.c > > fail with similar missing stubs-ilp32d.h errors. > > > > I want to sanity-check with other people that they are seeing similar > > errors and that these errors indicate something wrong with the testsuit= e. > > If nobody else is seeing these errors, I'd like to hear how you're > > running the testsuite so I can debug the riscv-gnu-toolchain repo. > > > > Patrick > > > > [1]: > > Executing on host: > > /github/ewlu-runner-2/_work/riscv-gnu-toolchain/riscv-gnu-toolchain/bui= ld/build-gcc-linux-stage2/gcc/xgcc > > -B/github/ewlu-runner-2/_work/riscv-gnu-toolchain/riscv-gnu-toolchain/b= uild/build-gcc-linux-stage2/gcc/ > > /github/ewlu-runner-2/_work/riscv-gnu-toolchain/riscv-gnu-toolchain/gcc= /gcc/testsuite/gcc.target/riscv/rvv/autovec/math-ceil-1.c > > -march=3Drv32gcv -mabi=3Dilp32d -mcmodel=3Dmedlow -fdiagnostics-plain-o= utput > > -O3 -ftree-vectorize -march=3Drv64gcv -mabi=3Dlp64d -O3 -ftree-vectoriz= e > > -fno-vect-cost-model -ffast-math -fno-schedule-insns > > -fno-schedule-insns2 -S -o math-ceil-1.s (timeout =3D 600) > > spawn -ignore SIGHUP > > /github/ewlu-runner-2/_work/riscv-gnu-toolchain/riscv-gnu-toolchain/bui= ld/build-gcc-linux-stage2/gcc/xgcc > > -B/github/ewlu-runner-2/_work/riscv-gnu-toolchain/riscv-gnu-toolchain/b= uild/build-gcc-linux-stage2/gcc/ > > /github/ewlu-runner-2/_work/riscv-gnu-toolchain/riscv-gnu-toolchain/gcc= /gcc/testsuite/gcc.target/riscv/rvv/autovec/math-ceil-1.c > > -march=3Drv32gcv -mabi=3Dilp32d -mcmodel=3Dmedlow -fdiagnostics-plain-o= utput > > -O3 -ftree-vectorize -march=3Drv64gcv -mabi=3Dlp64d -O3 -ftree-vectoriz= e > > -fno-vect-cost-model -ffast-math -fno-schedule-insns > > -fno-schedule-insns2 -S -o math-ceil-1.s > > In file included from > > /github/ewlu-runner-2/_work/riscv-gnu-toolchain/riscv-gnu-toolchain/bui= ld/sysroot/usr/include/features.h:515, > > from > > /github/ewlu-runner-2/_work/riscv-gnu-toolchain/riscv-gnu-toolchain/bui= ld/sysroot/usr/include/bits/libc-header-start.h:33, > > from > > /github/ewlu-runner-2/_work/riscv-gnu-toolchain/riscv-gnu-toolchain/bui= ld/sysroot/usr/include/math.h:27, > > from > > /github/ewlu-runner-2/_work/riscv-gnu-toolchain/riscv-gnu-toolchain/gcc= /gcc/testsuite/gcc.target/riscv/rvv/autovec/test-math.h:1, > > from > > /github/ewlu-runner-2/_work/riscv-gnu-toolchain/riscv-gnu-toolchain/gcc= /gcc/testsuite/gcc.target/riscv/rvv/autovec/math-ceil-1.c:5: > > /github/ewlu-runner-2/_work/riscv-gnu-toolchain/riscv-gnu-toolchain/bui= ld/sysroot/usr/include/gnu/stubs.h:17:11: > > fatal error: gnu/stubs-lp64d.h: No such file or directory > > That looks like a toolchain build/configuration issue, not a test issue. > IIRC this comes up from time to time, something's probably broken in > riscv-gnu-toolchain but I'm not sure what's wrong. > > I get a working setup with just `./configure --enable-linux > --disable-multilib` and the latest riscv-gnu-toolchain master. How are > you building things? > > > compilation terminated. > > compiler exited with status 1 > > FAIL: gcc.target/riscv/rvv/autovec/math-ceil-1.c -O3 -ftree-vectorize > > (test for excess errors) > > > > [2]: > > https://github.com/ewlu/riscv-gnu-toolchain/issues/170 > > > > [3]: > > This also extends beyond math.h. I'm seeing similar failures for > > testcases like > > gcc.target/riscv/rvv/autovec/cond/cond_convert_int2float-rv64-1.c that > > #include . > > > > > > On 9/19/23 18:12, Patrick O'Neill wrote: > >> > >> I'll let it run overnight and see if this helps. Even before this patc= h, > >> I was seeing 233 stubs related failures for rv32gcv and 7 for rv64gcv = so > >> this won't fix all the issues. > >> > >> It's easily replicated using upstream riscv-gnu-toolchain > >> git clone https://github.com/riscv-collab/riscv-gnu-toolchain > >> cd riscv-gnu-toolchain > >> git submodule update --init gcc > >> cd gcc > >> git pull master > >> cd .. > >> mkdir build > >> cd build > >> ../configure --prefix=3D$(pwd) --with-arch=3Drv32gcv --with-abi=3Dilp3= 2d > >> make report-linux -j32 > >> > >> Then search for "stubs" in the debug logs > >> (/build-gcc-linux-stage2/gcc/testsuite/*.log) > >> > >> Patrick > >> > >> On 9/19/23 17:54, juzhe.zhong@rivai.ai wrote: > >>> I think we could remove match.h. > >>> > >>> Hi, @Patrick. Could you verify it? > >>> > >>> diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/def.h > >>> b/gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/def.h > >>> index 2292372d7a3..674098e9ba6 100644 > >>> --- a/gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/def.h > >>> +++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/def.h > >>> @@ -1,5 +1,4 @@ > >>> #include > >>> -#include > >>> > >>> and commit it. > >>> > >>> Thanks. > >>> ---------------------------------------------------------------------= ---