public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: hongtao Liu <liuhongt@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-2767] Fix typo in floorv2sf2, should be register_operand for op1, not vector_operand. Date: Thu, 22 Sep 2022 06:03:57 +0000 (GMT) [thread overview] Message-ID: <20220922060357.C592F385841A@sourceware.org> (raw) https://gcc.gnu.org/g:cbaa0ed34e1429dd9861350532534a85a07d220d commit r13-2767-gcbaa0ed34e1429dd9861350532534a85a07d220d Author: liuhongt <hongtao.liu@intel.com> Date: Wed Sep 21 16:07:39 2022 +0800 Fix typo in floorv2sf2, should be register_operand for op1, not vector_operand. gcc/ChangeLog: PR target/106994 * config/i386/mmx.md (floorv2sf2): Fix typo, use register_operand instead of vector_operand for operands[1]. gcc/testsuite/ChangeLog: * gcc.target/i386/pr106994.c: New test. Diff: --- gcc/config/i386/mmx.md | 2 +- gcc/testsuite/gcc.target/i386/pr106994.c | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/gcc/config/i386/mmx.md b/gcc/config/i386/mmx.md index 222a041de58..c359e2dd6de 100644 --- a/gcc/config/i386/mmx.md +++ b/gcc/config/i386/mmx.md @@ -1676,7 +1676,7 @@ (define_expand "floorv2sf2" [(set (match_operand:V2SF 0 "register_operand") (unspec:V2SF - [(match_operand:V2SF 1 "vector_operand") + [(match_operand:V2SF 1 "register_operand") (match_dup 2)] UNSPEC_ROUND))] "TARGET_SSE4_1 && !flag_trapping_math diff --git a/gcc/testsuite/gcc.target/i386/pr106994.c b/gcc/testsuite/gcc.target/i386/pr106994.c new file mode 100644 index 00000000000..0803311dc75 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr106994.c @@ -0,0 +1,24 @@ +/* { dg-do compile } */ +/* { dg-options "-march=skylake -Ofast" } */ + +typedef struct { + float ymin, ymax; +} rctf; + +rctf view2d_map_cur_using_maskUI_view2d_view_ortho_curmasked; +float view2d_map_cur_using_maskUI_view2d_view_ortho_yofs; + +void BLI_rctf_translate(); +void glLoadIdentity(); + +void +view2d_map_cur_using_maskUI_view2d_view_ortho() { + BLI_rctf_translate(&view2d_map_cur_using_maskUI_view2d_view_ortho_curmasked); + view2d_map_cur_using_maskUI_view2d_view_ortho_curmasked.ymin = + __builtin_floor(view2d_map_cur_using_maskUI_view2d_view_ortho_curmasked.ymin) - + view2d_map_cur_using_maskUI_view2d_view_ortho_yofs; + view2d_map_cur_using_maskUI_view2d_view_ortho_curmasked.ymax = + __builtin_floor(view2d_map_cur_using_maskUI_view2d_view_ortho_curmasked.ymax) - + view2d_map_cur_using_maskUI_view2d_view_ortho_yofs; + glLoadIdentity(); +}
reply other threads:[~2022-09-22 6:03 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220922060357.C592F385841A@sourceware.org \ --to=liuhongt@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).