From: Jakub Jelinek <jakub@redhat.com>
To: Vladimir Makarov <vmakarov@redhat.com>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: [committed] testsuite: Fix up gcc.target/i386/pr109137.c testcase [PR109137]
Date: Fri, 24 Mar 2023 09:54:06 +0100 [thread overview]
Message-ID: <ZB1lLvJxLGCAk2GT@tucnak> (raw)
In-Reply-To: <bb0f104a-ee16-0692-c0a1-f0c1c8b4ba8d@redhat.com>
Hi!
On Wed, Mar 22, 2023 at 01:37:39PM -0400, Vladimir Makarov via Gcc-patches wrote:
> * gcc.target/i386/pr109137.c: New.
The testcase has a couple of small problems:
1) had -m32 in dg-options, that should never be done, instead the test
should be guarded on ia32
2) adds -fPIC unconditionally (that should be guarded on fpic effective
target)
3) using #include <string.h> for a RA test seems unnecessary, __builtin_memset
handles it without the header
Bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk
as obvious.
2023-03-24 Jakub Jelinek <jakub@redhat.com>
PR target/109137
* gcc.target/i386/pr109137.c: Remove -m32 from dg-options, instead
require ia32 effective target. Only add -fPIC for fpic effective
target. Remove #include <string.h>, use __builtin_memset instead of
memset.
--- gcc/testsuite/gcc.target/i386/pr109137.c.jj 2023-03-23 10:00:58.776093791 +0100
+++ gcc/testsuite/gcc.target/i386/pr109137.c 2023-03-23 19:16:37.858850237 +0100
@@ -1,6 +1,8 @@
-/* { dg-do compile } */
-/* { dg-options "-m32 -O3 -march=znver1 -fPIC -mfpmath=sse -w" } */
-#include <string.h>
+/* PR target/109137 */
+/* { dg-do compile { target ia32 } } */
+/* { dg-options "-O3 -march=znver1 -mfpmath=sse -w" } */
+/* { dg-additional-options "-fPIC" { target fpic } } */
+
typedef struct {
char bytestream_end;
} CABACContext;
@@ -12,7 +14,7 @@ typedef struct {
} H264SliceContext;
H264SliceContext ff_h264_decode_mb_cabac_sl;
void ff_h264_decode_mb_cabac(void) {
- memset((void*)ff_h264_decode_mb_cabac_h_0, 6, 48);
+ __builtin_memset((void*)ff_h264_decode_mb_cabac_h_0, 6, 48);
int i;
for (;; i++) {
__asm__(""/* { dg-error "'asm' operand has impossible constraints" } */
@@ -25,4 +27,3 @@ void ff_h264_decode_mb_cabac(void) {
decode_cabac_mb_intra4x4_pred_mode_mode;
}
}
-
Jakub
prev parent reply other threads:[~2023-03-24 9:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-22 17:37 [pushed] [PR109137] LRA: Do not repeat inheritance and live range splitting in case of asm error Vladimir Makarov
2023-03-24 8:54 ` Jakub Jelinek [this message]
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=ZB1lLvJxLGCAk2GT@tucnak \
--to=jakub@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=vmakarov@redhat.com \
/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: link
Be 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).