public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] x86: Avoid uninitialized variable in PR target/104441 test
@ 2022-05-23 17:44 H.J. Lu
  2022-05-23 19:43 ` Uros Bizjak
  2022-05-24  6:25 ` Richard Biener
  0 siblings, 2 replies; 3+ messages in thread
From: H.J. Lu @ 2022-05-23 17:44 UTC (permalink / raw)
  To: gcc-patches; +Cc: Uros Bizjak, Richard Biener

	PR target/104441
	* gcc.target/i386/pr104441-1a.c (load8bit_4x4_avx2): Initialize
	src23.
---
 gcc/testsuite/gcc.target/i386/pr104441-1a.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.target/i386/pr104441-1a.c b/gcc/testsuite/gcc.target/i386/pr104441-1a.c
index 83734f710bd..0931029f2bb 100644
--- a/gcc/testsuite/gcc.target/i386/pr104441-1a.c
+++ b/gcc/testsuite/gcc.target/i386/pr104441-1a.c
@@ -8,7 +8,7 @@ __attribute__((always_inline, target("avx2")))
 static __m256i
 load8bit_4x4_avx2(const uint8_t *const src, const uint32_t stride)
 {
-  __m128i src01, src23;
+  __m128i src01, src23 = _mm_setzero_si128();
   src01 = _mm_cvtsi32_si128(*(int32_t*)(src + 0 * stride));
   src23 = _mm_insert_epi32(src23, *(int32_t *)(src + 3 * stride), 1);
   return _mm256_setr_m128i(src01, src23);
-- 
2.36.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86: Avoid uninitialized variable in PR target/104441 test
  2022-05-23 17:44 [PATCH] x86: Avoid uninitialized variable in PR target/104441 test H.J. Lu
@ 2022-05-23 19:43 ` Uros Bizjak
  2022-05-24  6:25 ` Richard Biener
  1 sibling, 0 replies; 3+ messages in thread
From: Uros Bizjak @ 2022-05-23 19:43 UTC (permalink / raw)
  To: H.J. Lu; +Cc: gcc-patches, Richard Biener

On Mon, May 23, 2022 at 7:44 PM H.J. Lu <hjl.tools@gmail.com> wrote:
>
>         PR target/104441
>         * gcc.target/i386/pr104441-1a.c (load8bit_4x4_avx2): Initialize
>         src23.

LGTM.

Thanks,
Uros.

> ---
>  gcc/testsuite/gcc.target/i386/pr104441-1a.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gcc/testsuite/gcc.target/i386/pr104441-1a.c b/gcc/testsuite/gcc.target/i386/pr104441-1a.c
> index 83734f710bd..0931029f2bb 100644
> --- a/gcc/testsuite/gcc.target/i386/pr104441-1a.c
> +++ b/gcc/testsuite/gcc.target/i386/pr104441-1a.c
> @@ -8,7 +8,7 @@ __attribute__((always_inline, target("avx2")))
>  static __m256i
>  load8bit_4x4_avx2(const uint8_t *const src, const uint32_t stride)
>  {
> -  __m128i src01, src23;
> +  __m128i src01, src23 = _mm_setzero_si128();
>    src01 = _mm_cvtsi32_si128(*(int32_t*)(src + 0 * stride));
>    src23 = _mm_insert_epi32(src23, *(int32_t *)(src + 3 * stride), 1);
>    return _mm256_setr_m128i(src01, src23);
> --
> 2.36.1
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86: Avoid uninitialized variable in PR target/104441 test
  2022-05-23 17:44 [PATCH] x86: Avoid uninitialized variable in PR target/104441 test H.J. Lu
  2022-05-23 19:43 ` Uros Bizjak
@ 2022-05-24  6:25 ` Richard Biener
  1 sibling, 0 replies; 3+ messages in thread
From: Richard Biener @ 2022-05-24  6:25 UTC (permalink / raw)
  To: H.J. Lu; +Cc: gcc-patches, Uros Bizjak

On Mon, 23 May 2022, H.J. Lu wrote:

> 	PR target/104441
> 	* gcc.target/i386/pr104441-1a.c (load8bit_4x4_avx2): Initialize
> 	src23.

OK.

Thanks for fixing.
Richard.

> ---
>  gcc/testsuite/gcc.target/i386/pr104441-1a.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/gcc/testsuite/gcc.target/i386/pr104441-1a.c b/gcc/testsuite/gcc.target/i386/pr104441-1a.c
> index 83734f710bd..0931029f2bb 100644
> --- a/gcc/testsuite/gcc.target/i386/pr104441-1a.c
> +++ b/gcc/testsuite/gcc.target/i386/pr104441-1a.c
> @@ -8,7 +8,7 @@ __attribute__((always_inline, target("avx2")))
>  static __m256i
>  load8bit_4x4_avx2(const uint8_t *const src, const uint32_t stride)
>  {
> -  __m128i src01, src23;
> +  __m128i src01, src23 = _mm_setzero_si128();
>    src01 = _mm_cvtsi32_si128(*(int32_t*)(src + 0 * stride));
>    src23 = _mm_insert_epi32(src23, *(int32_t *)(src + 3 * stride), 1);
>    return _mm256_setr_m128i(src01, src23);
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-05-24  6:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-23 17:44 [PATCH] x86: Avoid uninitialized variable in PR target/104441 test H.J. Lu
2022-05-23 19:43 ` Uros Bizjak
2022-05-24  6:25 ` Richard Biener

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).