public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/101809] New: emulated gather capability doesn't support 32-bit target
@ 2021-08-06 23:04 hjl.tools at gmail dot com
  2021-08-07 14:11 ` [Bug middle-end/101809] " hjl.tools at gmail dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: hjl.tools at gmail dot com @ 2021-08-06 23:04 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101809

            Bug ID: 101809
           Summary: emulated gather capability doesn't support 32-bit
                    target
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hjl.tools at gmail dot com
                CC: crazylht at gmail dot com, rguenth at gcc dot gnu.org
  Target Milestone: ---

On Linux/x86-64, I get

[hjl@gnu-cfl-2 xxx]$ cat x.c
#include <stdint.h>

#define loop_t uint32_t
#define idx_t uint32_t

void loop(double * const __restrict__ dst,
          double const * const __restrict__ src,
          idx_t const * const __restrict__ idx,
          loop_t const begin,
          loop_t const end)
{
  for (loop_t i = begin; i < end; ++i)
    dst[i] = 42.0 * src[idx[i]];
}
[hjl@gnu-cfl-2 xxx]$ make x.s
/export/build/gnu/tools-build/gcc-gitlab-debug/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/tools-build/gcc-gitlab-debug/build-x86_64-linux/gcc/ -O3
-m32 -march=x86-64 -mfpmath=sse -S x.c
[hjl@gnu-cfl-2 xxx]$ cat x.s
        .file   "x.c"
        .text
        .p2align 4
        .globl  loop
        .type   loop, @function
loop:
.LFB0:
        .cfi_startproc
        pushl   %edi
        .cfi_def_cfa_offset 8
        .cfi_offset 7, -8
        pushl   %esi
        .cfi_def_cfa_offset 12
        .cfi_offset 6, -12
        pushl   %ebx
        .cfi_def_cfa_offset 16
        .cfi_offset 3, -16
        movl    28(%esp), %eax
        movl    32(%esp), %ecx
        movl    16(%esp), %ebx
        movl    20(%esp), %esi
        movl    24(%esp), %edi
        cmpl    %ecx, %eax
        jnb     .L1
        movsd   .LC0, %xmm1
        .p2align 4,,10
        .p2align 3
.L3:
        movl    (%edi,%eax,4), %edx
        movsd   (%esi,%edx,8), %xmm0
        mulsd   %xmm1, %xmm0
        movsd   %xmm0, (%ebx,%eax,8)
        addl    $1, %eax
        cmpl    %eax, %ecx
        jne     .L3
.L1:
        popl    %ebx
        .cfi_restore 3
        .cfi_def_cfa_offset 12
        popl    %esi
        .cfi_restore 6
        .cfi_def_cfa_offset 8
        popl    %edi
        .cfi_restore 7
        .cfi_def_cfa_offset 4
        ret
        .cfi_endproc
.LFE0:
        .size   loop, .-loop
        .section        .rodata.cst8,"aM",@progbits,8
        .align 8
.LC0:
        .long   0
        .long   1078263808
        .ident  "GCC: (GNU) 12.0.0 20210806 (experimental)"
        .section        .note.GNU-stack,"",@progbits
[hjl@gnu-cfl-2 xxx]$ 

emulated gather capability isn't enabled.

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

end of thread, other threads:[~2021-08-10 12:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-06 23:04 [Bug middle-end/101809] New: emulated gather capability doesn't support 32-bit target hjl.tools at gmail dot com
2021-08-07 14:11 ` [Bug middle-end/101809] " hjl.tools at gmail dot com
2021-08-09  7:31 ` [Bug tree-optimization/101809] " rguenth at gcc dot gnu.org
2021-08-09  8:50 ` rguenth at gcc dot gnu.org
2021-08-10  9:29 ` rguenth at gcc dot gnu.org
2021-08-10 10:25 ` cvs-commit at gcc dot gnu.org
2021-08-10 10:28 ` rguenth at gcc dot gnu.org
2021-08-10 12:34 ` cvs-commit at gcc dot gnu.org

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