From: Thorsten Otto <admin@tho-otto.de>
To: git@vger.kernel.org
Subject: [BUG] "git am" gets confused when commit message contains text looking like a diff
Date: Sat, 20 Aug 2022 09:12:04 +0200 [thread overview]
Message-ID: <16297305.cDA1TJNmNo@earendil> (raw)
[-- Attachment #1: Type: text/plain, Size: 496 bytes --]
Observed on the releases/gcc-6 branch of https://github.com/gcc-mirror/gcc .
There is a commit backported from the main branch, which looks like the
attached file when extracting it with "git format-patch -1
c86135dec7521ca3a877fa455b449dd8aa068a9c".
When trying to apply that patch with "git am", you get an error message:
error: config/rs6000/rs6000.md (working copy): does not exist in index
Apparently git tries to apply the diff from the git commit message, instead of
the real diff.
[-- Attachment #2: 0001-This-showed-up-in-power9-code-for-__divkf3-software-.patch --]
[-- Type: text/x-patch, Size: 2416 bytes --]
From c86135dec7521ca3a877fa455b449dd8aa068a9c Mon Sep 17 00:00:00 2001
From: Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
Date: Tue, 14 Mar 2017 14:43:03 +0000
Subject: [PATCH] This showed up in power9 code for __divkf3 software float
support and caused a...
This showed up in power9 code for __divkf3 software float support and
caused a divd to be emitted where we needed a divdu.
Index: gcc/config/rs6000/rs6000.md
===================================================================
--- gcc/config/rs6000/rs6000.md (revision 246123)
+++ gcc/config/rs6000/rs6000.md (working copy)
@@ -3063,8 +3063,8 @@
&& ! reg_mentioned_p (operands[3], operands[1])
&& ! reg_mentioned_p (operands[3], operands[2])"
[(set (match_dup 0)
- (div:GPR (match_dup 1)
- (match_dup 2)))
+ (udiv:GPR (match_dup 1)
+ (match_dup 2)))
(set (match_dup 3)
(mult:GPR (match_dup 0)
(match_dup 2)))
2017-03-14 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
Backport from mainline
2017-02-28 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
PR target/79752
* config/rs6000/rs6000.md (peephole2 for udiv/umod): Should emit
udiv rather than div since input pattern is unsigned.
From-SVN: r246127
---
gcc/ChangeLog | 9 +++++++++
gcc/config/rs6000/rs6000.md | 4 ++--
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a65effcebc2..9a9858ce86e 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,12 @@
+2017-03-14 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
+
+ Backport from mainline
+ 2017-02-28 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
+
+ PR target/79752
+ * config/rs6000/rs6000.md (peephole2 for udiv/umod): Should emit
+ udiv rather than div since input pattern is unsigned.
+
2017-03-14 Richard Biener <rguenther@suse.de>
Backport from mainline
diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
index b2592b55a25..c54e7271302 100644
--- a/gcc/config/rs6000/rs6000.md
+++ b/gcc/config/rs6000/rs6000.md
@@ -3063,8 +3063,8 @@
&& ! reg_mentioned_p (operands[3], operands[1])
&& ! reg_mentioned_p (operands[3], operands[2])"
[(set (match_dup 0)
- (div:GPR (match_dup 1)
- (match_dup 2)))
+ (udiv:GPR (match_dup 1)
+ (match_dup 2)))
(set (match_dup 3)
(mult:GPR (match_dup 0)
(match_dup 2)))
--
2.24.0
next reply other threads:[~2022-08-20 7:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-20 7:12 Thorsten Otto [this message]
2022-08-20 21:35 ` [BUG] "git am" gets confused when commit message contains text looking like a diff Junio C Hamano
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=16297305.cDA1TJNmNo@earendil \
--to=admin@tho-otto.de \
--cc=git@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.