From: Lulu Cheng Date: Wed, 27 Apr 2022 07:07:05 +0000 (+0800) Subject: LoongArch: Add fdiv define_expand template. X-Git-Tag: basepoints/gcc-13~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1b21d79e4e462e38868486bbf3d1eaf4c14cc6d0;p=thirdparty%2Fgcc.git LoongArch: Add fdiv define_expand template. gcc/ChangeLog: * config/loongarch/loongarch.md: Add fdiv define_expand template, then generate floating-point division and floating-point reciprocal instructions. --- diff --git a/gcc/config/loongarch/loongarch.md b/gcc/config/loongarch/loongarch.md index 5a7641703b54..d3c809e25f34 100644 --- a/gcc/config/loongarch/loongarch.md +++ b/gcc/config/loongarch/loongarch.md @@ -713,6 +713,12 @@ ;; ;; Float division and modulus. +(define_expand "div3" + [(set (match_operand:ANYF 0 "register_operand") + (div:ANYF (match_operand:ANYF 1 "reg_or_1_operand") + (match_operand:ANYF 2 "register_operand")))] + "") + (define_insn "*div3" [(set (match_operand:ANYF 0 "register_operand" "=f") (div:ANYF (match_operand:ANYF 1 "register_operand" "f")