From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 70240 invoked by alias); 9 Sep 2016 22:03:47 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 70230 invoked by uid 89); 9 Sep 2016 22:03:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=arm*-*-*, arm***, Hx-languages-length:1123 X-HELO: mail-oi0-f54.google.com Received: from mail-oi0-f54.google.com (HELO mail-oi0-f54.google.com) (209.85.218.54) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 09 Sep 2016 22:03:36 +0000 Received: by mail-oi0-f54.google.com with SMTP id m11so168652919oif.1 for ; Fri, 09 Sep 2016 15:03:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=QgWjoG8R8PFMkIgekv5mJ7GTmSVE84J5uQYPMIFT53I=; b=C11BmWHB194Pd8os8KmnpAHVMA/ZgsN4vIzhmbfYkob1kEKovOExa/RTjVw+zxvTpa yLSYYyVFUgVPDbGJtRafdL5lhbS1UjswMHBnLJV6I0bw04PB8X+kD+zXdys+/76zlXls WgvY8ARtb43E9aGndTjoZmKB9qzAS/La9fL6dctPYFi85AFiigyqX9dOFzY4cLwSd+22 yGG88Af0BaNW3ymEuXIvUOpKPG//NlzwIGzzdJoZzGIw7qq4E3A05ghmlZoyapLjM3jO IadjOCpZaRdA9+OWxy8TAV7YXCZ38azthDdMjpSlN7HRJJ2SaQ8wrEPRGgUg6CFoHCbY 9/fg== X-Gm-Message-State: AE9vXwOLOShgkw8d8Q2XsYQtB/LGedAYyehuHb5xlPmYe8PMsJmspXAiY8jYDdqBAkuhIVUvb0yOxKwrhnX7BfUG X-Received: by 10.157.20.73 with SMTP id h67mr8814322oth.60.1473458615094; Fri, 09 Sep 2016 15:03:35 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.81.85 with HTTP; Fri, 9 Sep 2016 15:03:34 -0700 (PDT) From: Prathamesh Kulkarni Date: Fri, 09 Sep 2016 22:05:00 -0000 Message-ID: Subject: [PING] set libfunc entry for sdivmod_optab to NULL in optabs.def To: gcc Patches , Richard Sandiford Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2016-09/txt/msg00553.txt.bz2 Hi, I would like to ping the following patch: https://gcc.gnu.org/ml/gcc-patches/2016-08/msg01015.html While implementing divmod transform: https://gcc.gnu.org/ml/gcc-patches/2016-05/msg01757.html I ran into an issue with optab_libfunc(). It appears optab_libfunc (sdivmod_optab, mode) returns bogus libfunc for unsupported modes, for instance on x86_64, optab_libfunc (sdivmod_optab, DImode) returns a libfunc with name "__divmoddi4", even though such a libfunc does not exist in libgcc. This happens because in optabs.def the libfunc entry for sdivmod_optab has gen_int_libfunc, and call to optab_libfunc (sdivmo_optab, DImode) lazily creates a bogus libfunc "__divmoddi4" by calling gen_int_libfunc(). To work around this issue I set libfunc entry for sdivmod_optab to NULL and verified that optab_libfunc (sdivmod_optab, DImode) returns NULL_RTX instead of a bogus libfunc if it's not overriden by the target. Bootstrapped and tested on ppc64le-linux-gnu, x86_64-linux-gnu. Cross tested on arm*-*-*, aarch64*-*-*. OK for trunk ? Thanks, Prathamesh