On 7/26/24 12:43 PM, Raphael Zinsly wrote:
On Fri, Jul 26, 2024 at 2:00 PM Jeff Law <jeffreya...@gmail.com> wrote:
On 7/24/24 12:00 PM, Raphael Moreira Zinsly wrote:
...
diff --git a/gcc/config/riscv/riscv.md b/gcc/config/riscv/riscv.md
index 46c46039c33..5780c5abacf 100644
--- a/gcc/config/riscv/riscv.md
+++ b/gcc/config/riscv/riscv.md
@@ -3969,7 +3969,7 @@
       (unspec:BLK [(match_operand:X 0 "register_operand" "r")
                    (match_operand:X 1 "register_operand" "r")]
                   UNSPEC_TIE))]
-  ""
+  "!rtx_equal_p (operands[0], operands[1])"
     ""
     [(set_attr "type" "ghost")
      (set_attr "length" "0")]
I'm guessing this condition to to prevent subsequent passes from combining
the stack tie with something like a reg->reg copy resulting in a stack
tie with the same source/dest register?

Correct, specifically it can result in a stack tie with sp as both the
src and dest registers and removing the S0 move needed in the vector
probe loop.
Thanks. I think this first patch is OK as-is. Given its NFC, you might as well go ahead and install it whenever it's convenient for you.

Jeff

Reply via email to