From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 45F7D3853802; Fri, 6 Aug 2021 23:04:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 45F7D3853802 From: "hjl.tools at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/101809] New: emulated gather capability doesn't support 32-bit target Date: Fri, 06 Aug 2021 23:04:57 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: hjl.tools at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Aug 2021 23:04:58 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101809 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 #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 =3D begin; i < end; ++i) dst[i] =3D 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=3Dx86-64 -mfpmath=3Dsse -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]$=20 emulated gather capability isn't enabled.=