From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by sourceware.org (Postfix) with ESMTPS id 550CA3858C74 for ; Thu, 21 Sep 2023 11:26:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 550CA3858C74 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivosinc.com Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-1c1ff5b741cso7120685ad.2 for ; Thu, 21 Sep 2023 04:26:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1695295586; x=1695900386; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:message-id:to:from:cc :in-reply-to:subject:date:from:to:cc:subject:date:message-id :reply-to; bh=EaipHPZikzjn7cq29v7hGp4S4ZDL7yhwavEaLOH8wYg=; b=pNjGwJn3mzDTCu1whnH0EsQhFM5RvI+nqW+S/zRgQm7Dqi/eMj3EgBsq+Sy3nHOmEm WwPCeMWNC3Jp167XuikDT4tCeIWCgYUwg1iIqv+0E99qPM47FJxiUhwnyg2hXEMGs8Ce JTW6jsPkrF4FXm+6BCejuMQZ2HO3Fhkx7JtktzGCpxSx66SuQ4CvgzPxQF188putpu0K TP7CdAaxRuNplS+cvMHwI8yMT028WG3ynRlDGQ1eGe7ZxOBVLvB0tEJWEKwiic5UhUX/ gPGE1yszKJRGCvxZf2wCfh0ovmxN5lLRd6CVXTSY0xMCoGVaW/gyOtk87ddkGQFDIReh LAiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695295586; x=1695900386; h=content-transfer-encoding:mime-version:message-id:to:from:cc :in-reply-to:subject:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=EaipHPZikzjn7cq29v7hGp4S4ZDL7yhwavEaLOH8wYg=; b=vyyxwY8U0k8I0e4xBCHHq1UHgHW4H5+52s12rBiKztVs2vhT5p0NBJnjIkd51mm2fP sDoNgfmizH41tDJjPeQ8koKzknwzc/ploxuieTAazuqnW1X+tNogX0rXaWeV+fzSSvbT SK2Ve2Ds932te66XJu3udTz8jWYVlIVFfhdlNM5bWaiaDaa6HrBXL6onI6+WhxAvRj2/ SA7/e56ajSrlrUJF1687CzNyQH89M7Jj9oqq4QLfyppwE+emb/PfM/CdeWa4uIePjiYD K4pARWgCtJhn0+vESMRBj3ErIBl34JqhzcxB7R+9ZXdlmuFCfKon8bqYs2MLHlXZP3bq JXYg== X-Gm-Message-State: AOJu0YxuJiyvAMCSUs51IOGZGNmvfiQvqVT9s1FggQn5b0Mhpnb2zGKM NgZ5STojNCXcFxw9TvsfN8bYzQ== X-Google-Smtp-Source: AGHT+IHxBu/r9xLHeT19TdkWTWfV9B5YxZwS2obHdBRw2AuULnkCZJTjHv2PZASibjf5ooxJuUePMg== X-Received: by 2002:a17:902:bb83:b0:1c2:82e:32de with SMTP id m3-20020a170902bb8300b001c2082e32demr4104393pls.0.1695295586147; Thu, 21 Sep 2023 04:26:26 -0700 (PDT) Received: from localhost ([51.52.155.79]) by smtp.gmail.com with ESMTPSA id e2-20020a170902d38200b001ab2b4105ddsm1237709pld.60.2023.09.21.04.26.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Sep 2023 04:26:25 -0700 (PDT) Date: Thu, 21 Sep 2023 04:26:25 -0700 (PDT) X-Google-Original-Date: Thu, 21 Sep 2023 04:26:21 PDT (-0700) Subject: Re: [Committed] RISC-V: Support VLS unary floating-point patterns In-Reply-To: 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 From: Palmer Dabbelt To: kito.cheng@sifive.com Message-ID: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-10.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 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: On Thu, 21 Sep 2023 04:24:48 PDT (-0700), kito.cheng@sifive.com wrote: > 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 That's probably the right way to go for the test suite. Something's still wrong somewhere with Patrick's builds, though... > > On Thu, Sep 21, 2023 at 11:20 AM 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.1728132-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 real >> > 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 testsuite. >> > 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/build/build-gcc-linux-stage2/gcc/xgcc >> > -B/github/ewlu-runner-2/_work/riscv-gnu-toolchain/riscv-gnu-toolchain/build/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=rv32gcv -mabi=ilp32d -mcmodel=medlow -fdiagnostics-plain-output >> > -O3 -ftree-vectorize -march=rv64gcv -mabi=lp64d -O3 -ftree-vectorize >> > -fno-vect-cost-model -ffast-math -fno-schedule-insns >> > -fno-schedule-insns2 -S -o math-ceil-1.s (timeout = 600) >> > spawn -ignore SIGHUP >> > /github/ewlu-runner-2/_work/riscv-gnu-toolchain/riscv-gnu-toolchain/build/build-gcc-linux-stage2/gcc/xgcc >> > -B/github/ewlu-runner-2/_work/riscv-gnu-toolchain/riscv-gnu-toolchain/build/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=rv32gcv -mabi=ilp32d -mcmodel=medlow -fdiagnostics-plain-output >> > -O3 -ftree-vectorize -march=rv64gcv -mabi=lp64d -O3 -ftree-vectorize >> > -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/build/sysroot/usr/include/features.h:515, >> > from >> > /github/ewlu-runner-2/_work/riscv-gnu-toolchain/riscv-gnu-toolchain/build/sysroot/usr/include/bits/libc-header-start.h:33, >> > from >> > /github/ewlu-runner-2/_work/riscv-gnu-toolchain/riscv-gnu-toolchain/build/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/build/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 patch, >> >> 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=$(pwd) --with-arch=rv32gcv --with-abi=ilp32d >> >> 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. >> >>> ------------------------------------------------------------------------