[07/15] xtensa: Fix non-robust split condition in define_insn_and_split

Message ID 8da19177eb5044f4f79571524c95ff4bac4e1aaa.1636621345.git.linkw@linux.ibm.com
State Committed
Commit 2b5b8610e985e23a0c2e0272339ab074a750e240
Headers
Series Fix non-robust split condition in define_insn_and_split |

Commit Message

Kewen.Lin Nov. 11, 2021, 11:24 a.m. UTC
  This patch is to fix some non-robust split conditions in some
define_insn_and_splits, to make each of them applied on top of
the corresponding condition for define_insn part, otherwise the
splitting could perform unexpectedly.

gcc/ChangeLog:

	* config/xtensa/xtensa.md (movdi_internal, movdf_internal): Fix split
	condition.
---
 gcc/config/xtensa/xtensa.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Comments

Li, Pan2 via Gcc-patches Nov. 19, 2021, 10:26 p.m. UTC | #1
On Thu, Nov 11, 2021 at 3:25 AM Kewen Lin <linkw@linux.ibm.com> wrote:
> gcc/ChangeLog:
>
>         * config/xtensa/xtensa.md (movdi_internal, movdf_internal): Fix split
>         condition.

I had been hoping Max would reply (as I'm just doing legacy work
around this these days), but seeing that he hasn't. This is approved.
  
Kewen.Lin Nov. 22, 2021, 2:21 a.m. UTC | #2
on 2021/11/20 上午6:26, augustine.sterling@gmail.com wrote:
> On Thu, Nov 11, 2021 at 3:25 AM Kewen Lin <linkw@linux.ibm.com> wrote:
>> gcc/ChangeLog:
>>
>>         * config/xtensa/xtensa.md (movdi_internal, movdf_internal): Fix split
>>         condition.
> 
> I had been hoping Max would reply (as I'm just doing legacy work
> around this these days), but seeing that he hasn't. This is approved.
> 

Thanks Augustine!  Committed as r12-5444.

BR,
Kewen
  

Patch

diff --git a/gcc/config/xtensa/xtensa.md b/gcc/config/xtensa/xtensa.md
index cdf22f14b94..e0bf720d6e0 100644
--- a/gcc/config/xtensa/xtensa.md
+++ b/gcc/config/xtensa/xtensa.md
@@ -779,7 +779,7 @@  (define_insn_and_split "movdi_internal"
   "register_operand (operands[0], DImode)
    || register_operand (operands[1], DImode)"
   "#"
-  "reload_completed"
+  "&& reload_completed"
   [(set (match_dup 0) (match_dup 2))
    (set (match_dup 1) (match_dup 3))]
 {
@@ -1053,7 +1053,7 @@  (define_insn_and_split "movdf_internal"
   "register_operand (operands[0], DFmode)
    || register_operand (operands[1], DFmode)"
   "#"
-  "reload_completed"
+  "&& reload_completed"
   [(set (match_dup 0) (match_dup 2))
    (set (match_dup 1) (match_dup 3))]
 {