On Thu, Jun 30, 2022 at 7:59 AM Haochen Jiang <haochen.ji...@intel.com> wrote:
>
> Hi all,
>
> This patch aims to fix the cvtps2pd insn, which should also work on
> memory operand but currently does not. After this fix, when loop == 2,
> it will eliminate movq instruction.
>
> Regtested on x86_64-pc-linux-gnu. Ok for trunk?
>
> BRs,
> Haochen
>
> gcc/ChangeLog:
>
>         PR target/43618
>         * config/i386/sse.md (extendv2sfv2df2): New define_expand.
>         (sse2_cvtps2pd_load<mask_name>): Rename extendvsdfv2df2.
>
> gcc/testsuite/ChangeLog:
>
>         PR target/43618
>         * gcc.target/i386/pr43618-1.c: New test.

This patch could be as simple as:

diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md
index 8cd0f617bf3..c331445cb2d 100644
--- a/gcc/config/i386/sse.md
+++ b/gcc/config/i386/sse.md
@@ -9195,7 +9195,7 @@
(define_insn "extendv2sfv2df2"
  [(set (match_operand:V2DF 0 "register_operand" "=v")
       (float_extend:V2DF
-         (match_operand:V2SF 1 "register_operand" "v")))]
+         (match_operand:V2SF 1 "nonimmediate_operand" "vm")))]
  "TARGET_MMX_WITH_SSE"
  "%vcvtps2pd\t{%1, %0|%0, %1}"
  [(set_attr "type" "ssecvt")

Uros.

Reply via email to