public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Kwok Cheung Yeung <kcy@codesourcery.com>
To: gcc-patches <gcc-patches@gcc.gnu.org>,
	Andrew Stubbs <ams@codesourcery.com>
Subject: [COMMITTED] amdgcn: Fix expansion of GCN_BUILTIN_LDEXPV builtin
Date: Tue, 8 Nov 2022 15:08:06 +0000	[thread overview]
Message-ID: <dcec9860-4091-3b32-3a55-4bd5df85e010@codesourcery.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 230 bytes --]

Hello

This patch fixes a bug in the expansion of GCN_BUILTIN_LDEXPV. As this 
is a double-precision operation, the first argument should be expanded 
as a V64DF expression (instead of V64SF).

Committed to trunk as obvious.

Kwok

[-- Attachment #2: 0001-amdgcn-Fix-expansion-of-GCN_BUILTIN_LDEXPV-builtin.patch --]
[-- Type: text/plain, Size: 1023 bytes --]

From cb0a2b1f28cf0c231bf38fcd02c40689739df7bb Mon Sep 17 00:00:00 2001
From: Kwok Cheung Yeung <kcy@codesourcery.com>
Date: Tue, 8 Nov 2022 14:38:23 +0000
Subject: [PATCH] amdgcn: Fix expansion of GCN_BUILTIN_LDEXPV builtin

2022-11-08  Kwok Cheung Yeung  <kcy@codesourcery.com>

	gcc/
	* config/gcn/gcn.cc (gcn_expand_builtin_1): Expand first argument
	of GCN_BUILTIN_LDEXPV to V64DFmode.
---
 gcc/config/gcn/gcn.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/config/gcn/gcn.cc b/gcc/config/gcn/gcn.cc
index 9c5e3419748..5e6f3b8b74b 100644
--- a/gcc/config/gcn/gcn.cc
+++ b/gcc/config/gcn/gcn.cc
@@ -4383,7 +4383,7 @@ gcn_expand_builtin_1 (tree exp, rtx target, rtx /*subtarget */ ,
 	  return target;
 	rtx arg1 = force_reg (V64DFmode,
 			      expand_expr (CALL_EXPR_ARG (exp, 0), NULL_RTX,
-					   V64SFmode,
+					   V64DFmode,
 					   EXPAND_NORMAL));
 	rtx arg2 = force_reg (V64SImode,
 			      expand_expr (CALL_EXPR_ARG (exp, 1), NULL_RTX,
-- 
2.25.1


                 reply	other threads:[~2022-11-08 15:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dcec9860-4091-3b32-3a55-4bd5df85e010@codesourcery.com \
    --to=kcy@codesourcery.com \
    --cc=ams@codesourcery.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).