From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by sourceware.org (Postfix) with ESMTPS id EA321385481F for ; Tue, 25 May 2021 14:29:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org EA321385481F Received: by mail-ed1-x536.google.com with SMTP id df21so36505061edb.3 for ; Tue, 25 May 2021 07:29:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=jlItXT7lbaEe66xhjPgSSY7GTSqRK4oRHLFF6/fcZzM=; b=dgBBb8WaNt985eUtrjPr2iJOImAwnUJUjZPz4pBieKJy3sYSePhpKUw9N4yKcKmAMH Lr3kfk9vMWt5fab9Ju1EnBgQTLOdkng/PTX05DN23YqG9fDtscbyEMWvcOe0+osGZ/oG ZF9YMES7HkBHYUzT1wWD2GNRPARxGF1Ejps8qGKaw+fLFgPGnFSeOaVDMBmDoBqRxoqJ szT4aSyxYHdvuybJavTxCnB4ZKLVSObSqiRJpadLg04py3QLuzCHO6xCTWaAZSOmy1fD mH45hLzoGHXw5oVu6AKjM4eFFnwAyRzZ8quAvnv96a8waIYjLBaF7tDUm98i+aC8941v QR6Q== X-Gm-Message-State: AOAM532+O07Xbz0BWtxC4PWRWudyHysYR+BoMVCCZSkbrcZexGXNuUlv 6PjRoXxH70Tdt2Cuv/MT5xgPiMbRaCQJ8gk6Md4= X-Google-Smtp-Source: ABdhPJwrYik+iVMN32HOLIdpAHI7qS3tOqoCYfbZYRIGkMAVOoQVjTWp5c+p7IIh8li/8Q9kQdM7uLbeWHZdUP4OCPs= X-Received: by 2002:aa7:cf06:: with SMTP id a6mr33153670edy.138.1621952985431; Tue, 25 May 2021 07:29:45 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Richard Biener Date: Tue, 25 May 2021 16:29:34 +0200 Message-ID: Subject: Re: [RFC PATCH] i386: Enable auto-vectorization for 32bit modes (+ testcases) To: Uros Bizjak Cc: "gcc-patches@gcc.gnu.org" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 May 2021 14:29:48 -0000 On Fri, May 21, 2021 at 5:00 PM Uros Bizjak via Gcc-patches wrote: > > Here it is, the patch that enables auto-vectorization for 32bit modes. > > Sent as RFC, because the patch fails some vectorizer scans, as it > obviously enables more vectorization to happen: > > Running target unix > FAIL: gcc.dg/vect/pr71264.c -flto -ffat-lto-objects scan-tree-dump > vect "vectorized 1 loops in function" > FAIL: gcc.dg/vect/pr71264.c scan-tree-dump vect "vectorized 1 loops in function" > FAIL: gcc.dg/vect/slp-28.c -flto -ffat-lto-objects > scan-tree-dump-times vect "vectorized 1 loops" 1 > FAIL: gcc.dg/vect/slp-28.c -flto -ffat-lto-objects > scan-tree-dump-times vect "vectorizing stmts using SLP" 1 > FAIL: gcc.dg/vect/slp-28.c scan-tree-dump-times vect "vectorized 1 loops" 1 > FAIL: gcc.dg/vect/slp-28.c scan-tree-dump-times vect "vectorizing > stmts using SLP" 1 > FAIL: gcc.dg/vect/slp-3.c -flto -ffat-lto-objects > scan-tree-dump-times vect "vectorized 3 loops" 1 > FAIL: gcc.dg/vect/slp-3.c -flto -ffat-lto-objects > scan-tree-dump-times vect "vectorizing stmts using SLP" 3 > FAIL: gcc.dg/vect/slp-3.c scan-tree-dump-times vect "vectorized 3 loops" 1 > FAIL: gcc.dg/vect/slp-3.c scan-tree-dump-times vect "vectorizing stmts > using SLP" 3 > > > Running target unix/-m32 > FAIL: gcc.dg/vect/no-vfa-vect-101.c scan-tree-dump-times vect "can't > determine dependence" 1 > FAIL: gcc.dg/vect/no-vfa-vect-102.c scan-tree-dump-times vect > "possible dependence between data-refs" 1 > FAIL: gcc.dg/vect/no-vfa-vect-102a.c scan-tree-dump-times vect > "possible dependence between data-refs" 1 > FAIL: gcc.dg/vect/no-vfa-vect-37.c scan-tree-dump-times vect "can't > determine dependence" 2 > FAIL: gcc.dg/vect/pr71264.c -flto -ffat-lto-objects scan-tree-dump > vect "vectorized 1 loops in function" > FAIL: gcc.dg/vect/pr71264.c scan-tree-dump vect "vectorized 1 loops in function" > FAIL: gcc.dg/vect/slp-28.c -flto -ffat-lto-objects > scan-tree-dump-times vect "vectorized 1 loops" 1 > FAIL: gcc.dg/vect/slp-28.c -flto -ffat-lto-objects > scan-tree-dump-times vect "vectorizing stmts using SLP" 1 > FAIL: gcc.dg/vect/slp-28.c scan-tree-dump-times vect "vectorized 1 loops" 1 > FAIL: gcc.dg/vect/slp-28.c scan-tree-dump-times vect "vectorizing > stmts using SLP" 1 > FAIL: gcc.dg/vect/slp-3.c -flto -ffat-lto-objects > scan-tree-dump-times vect "vectorized 3 loops" 1 > FAIL: gcc.dg/vect/slp-3.c -flto -ffat-lto-objects > scan-tree-dump-times vect "vectorizing stmts using SLP" 3 > FAIL: gcc.dg/vect/slp-3.c scan-tree-dump-times vect "vectorized 3 loops" 1 > FAIL: gcc.dg/vect/slp-3.c scan-tree-dump-times vect "vectorizing stmts > using SLP" 3 > FAIL: gcc.dg/vect/vect-104.c -flto -ffat-lto-objects > scan-tree-dump-times vect "possible dependence between data-refs" 1 > FAIL: gcc.dg/vect/vect-104.c scan-tree-dump-times vect "possible > dependence between data-refs" 1 Yeah, it's a bit iffy to adjust expectations. If there's a way to disable vectorization for 32bit modes on x86 that might be a way to "fix" them, otherwise we're lacking a way to query for available vector modes/sizes in the dejagnu vect targets. There's available_vector_sizes but it's implementation is hardly complete nor is size the only important thing (FP vs. INT). At least one could add a vect32 predicate similar to the existing vect64 one. Richard. > Please also note that V4QI and V2HI modes do not use MMX registers, so > auto-vectorization can also be enabled on 32bit x86 targets. > > Uros.