From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15095 invoked by alias); 22 Aug 2019 06:25:13 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 15087 invoked by uid 89); 22 Aug 2019 06:25:13 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=fwa, dwa, __builtin_fadd, f,wa X-HELO: gate.crashing.org Received: from gate.crashing.org (HELO gate.crashing.org) (63.228.1.57) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 22 Aug 2019 06:25:10 +0000 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id x7M6P5cW027383; Thu, 22 Aug 2019 01:25:05 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id x7M6P39W027377; Thu, 22 Aug 2019 01:25:03 -0500 Date: Thu, 22 Aug 2019 06:25:00 -0000 From: Segher Boessenkool To: Tejas Joshi Cc: gcc@gcc.gnu.org, Martin Jambor , hubicka@ucw.cz, joseph@codesourcery.com Subject: Re: Expansion of narrowing math built-ins into power instructions Message-ID: <20190822062503.GI31406@gate.crashing.org> References: <20190820121137.GP31406@gate.crashing.org> <20190820134613.GR31406@gate.crashing.org> <20190820194154.GY31406@gate.crashing.org> <20190821182852.GG31406@gate.crashing.org> <20190821191722.GH31406@gate.crashing.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-IsSubscribed: yes X-SW-Source: 2019-08/txt/msg00180.txt.bz2 Hi Tejas, [ Please do not top-post. ] On Thu, Aug 22, 2019 at 09:09:37AM +0530, Tejas Joshi wrote: > Yes, I tried basically every combination I could think of, just not > with the "isa attr". Now, I have the following code and it is still > seems not to be working. Am I missing any options to pass? > > (define_insn "add_truncdfsf3" > [(set (match_operand:SF 0 "gpc_reg_operand" "=f,wa") > (unspec:SF [(match_operand:DF 1 "gpc_reg_operand" "%d,wa") > (match_operand:DF 2 "gpc_reg_operand" "d,wa")] > UNSPEC_ADD_NARROWING))] > "TARGET_HARD_FLOAT" > "@ > fadds %0,%1,%2 > xsaddsp %x0,%x1,%x2" > [(set_attr "type" "fp") > (set_attr "isa" "*,p8v")]) > > with the code, I pass -O2 foo.c : > float > foo (double x, double y) > { > return __builtin_fadd (x, y); > } What happens then? "It does not work" is very very vague. At least it seems the compiler does build now? Segher