From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com [IPv6:2607:f8b0:4864:20::434]) by sourceware.org (Postfix) with ESMTPS id 54D093851404 for ; Mon, 31 Oct 2022 17:12:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 54D093851404 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pf1-x434.google.com with SMTP id k15so3166454pfg.2 for ; Mon, 31 Oct 2022 10:12:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Ffe+UyX3U0IacYOdIL3wgK+JRo1ExzonTthsaWlky0Q=; b=aIUOA3L0da4YH5rbHwjSLt29jtoMsJfYdoanvJtpzzvRZvXDDhUdbh3SA1z2LsUKFs tIErJ5GPH/qcSVLC0Oqp9RthEsoKZr+MQRopBFe12HEXZHXsyHWwwx65cYBaQ87nKZqS Lumlmd6NmH2Nlkvg3ivirZBDtwWNA9fjOkAKdoh1WdnIG8dXOq4CFG1Antj7maYL5kvr Me9D+7tEWjJI7paXBZ+EGjphtjgPotsfoBa3hBiH8OtQLJI2Sb3xPiO9ktSbQJmZ8POx 1KjqeQsViC9A/eUaeCa/KVjzyayn+kDPWDmozJ94EJz9MH4hhI0J4CLhzb3yKT/okdLQ fJ/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Ffe+UyX3U0IacYOdIL3wgK+JRo1ExzonTthsaWlky0Q=; b=4KV5RBC3f9Mr96jzO0x4/pspIzZyFIcwuE4fKhBm3CFFd1hhTKytl/V7tOBnw+xnWo VuqwVzpuWyL5NDKlj+aSdW7mwyn5BBeGq72ZKMqkg9vIym8tvEawobM8+yP+SXDvPoma KTWX9SesXVl3mH+4tZfwta9qDms+nEr8HACZh+EpzwoW8aS0zk2KwPCuUmouwZiOtux7 luVF7XTLRC+HvPk4rCOqwPtOLajK9YQOPtedT7K3zRWyZuBgZ/PuAxR8DihvCQriDJqw +GWniKKmCPSQ8kpp7H/YHcqefgWdrGwPLwn19b7vEtKnFgi8HiWXG1AM9gVAv7x23PL5 DnRw== X-Gm-Message-State: ACrzQf1v6IoGTrJt0F+WioH3+Q5dOylvgW/M03MGy3Qd+i6m3HpivcyF XWU2EYvBqCMd9btqFxg/1rI= X-Google-Smtp-Source: AMsMyM6ob+yud1cDhz5fC/F3AQS15KBvim/Or7FkIEnj0lqEWWi3Eizhj16EeBkWtzbY9BaHsrooFg== X-Received: by 2002:a63:1923:0:b0:441:2c12:f704 with SMTP id z35-20020a631923000000b004412c12f704mr13708840pgl.398.1667236370163; Mon, 31 Oct 2022 10:12:50 -0700 (PDT) Received: from ?IPV6:2601:681:8600:13d0::f0a? ([2601:681:8600:13d0::f0a]) by smtp.gmail.com with ESMTPSA id n6-20020a170902e54600b00182d25a1e4bsm4113384plf.259.2022.10.31.10.12.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 31 Oct 2022 10:12:49 -0700 (PDT) Message-ID: Date: Mon, 31 Oct 2022 11:12:48 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 Subject: Re: [PATCH 1/4]middle-end Support not decomposing specific divisions during vectorization. To: Tamar Christina , Richard Biener Cc: "gcc-patches@gcc.gnu.org" , nd References: Content-Language: en-US From: Jeff Law In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A,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 10/31/22 05:34, Tamar Christina wrote: >> The type of the expression should be available via the mode and the >> signedness, no? So maybe to avoid having both RTX and TREE on the target >> hook pass it a wide_int instead for the divisor? >> > Done. > > Bootstrapped Regtested on aarch64-none-linux-gnu, x86_64-pc-linux-gnu > and no issues. > > Ok for master? > > Thanks, > Tamar > > gcc/ChangeLog: > > * expmed.h (expand_divmod): Pass tree operands down in addition to RTX. > * expmed.cc (expand_divmod): Likewise. > * explow.cc (round_push, align_dynamic_address): Likewise. > * expr.cc (force_operand, expand_expr_divmod): Likewise. > * optabs.cc (expand_doubleword_mod, expand_doubleword_divmod): > Likewise. > * target.h: Include tree-core. > * target.def (can_special_div_by_const): New. > * targhooks.cc (default_can_special_div_by_const): New. > * targhooks.h (default_can_special_div_by_const): New. > * tree-vect-generic.cc (expand_vector_operation): Use it. > * doc/tm.texi.in: Document it. > * doc/tm.texi: Regenerate. > * tree-vect-patterns.cc (vect_recog_divmod_pattern): Check for support. > * tree-vect-stmts.cc (vectorizable_operation): Likewise. > > gcc/testsuite/ChangeLog: > > * gcc.dg/vect/vect-div-bitmask-1.c: New test. > * gcc.dg/vect/vect-div-bitmask-2.c: New test. > * gcc.dg/vect/vect-div-bitmask-3.c: New test. > * gcc.dg/vect/vect-div-bitmask.h: New file. > > --- inline copy of patch --- > OK for the trunk. Jeff