This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH, RISC-V] Fix ambiguous mode of some compare insn
- From: Katsuhiro Suzuki <katsuhiro at katsuster dot net>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sat, 6 Jul 2019 02:26:01 +0900
- Subject: [PATCH, RISC-V] Fix ambiguous mode of some compare insn
Hello,
This patch fixes ambiguous mode of some compare insns of RISC-V.
Only sge, slt and sle are using <MODE> but other compare insns use
<X:MODE>. It seems first group mode settings are ambiguous.
Best Regards,
Katsuhiro Suzuki
Index: gcc/config/riscv/riscv.md
===================================================================
--- gcc/config/riscv/riscv.md (revision 272852)
+++ gcc/config/riscv/riscv.md (working copy)
@@ -2054,7 +2054,7 @@
""
"slt%i2<u>\t%0,zero,%1"
[(set_attr "type" "slt")
- (set_attr "mode" "<MODE>")])
+ (set_attr "mode" "<X:MODE>")])
(define_insn "*slt<u>_<X:mode><GPR:mode>"
[(set (match_operand:GPR 0 "register_operand" "= r")
@@ -2063,7 +2063,7 @@
""
"slt%i2<u>\t%0,%1,%2"
[(set_attr "type" "slt")
- (set_attr "mode" "<MODE>")])
+ (set_attr "mode" "<X:MODE>")])
(define_insn "*sle<u>_<X:mode><GPR:mode>"
[(set (match_operand:GPR 0 "register_operand" "=r")
@@ -2075,7 +2075,7 @@
return "slt%i2<u>\t%0,%1,%2";
}
[(set_attr "type" "slt")
- (set_attr "mode" "<MODE>")])
+ (set_attr "mode" "<X:MODE>")])
;;
;; ....................