On Tue, Aug 16, 2022 at 11:41:06AM +0000, Richard Biener wrote:
> I'm OK with the rest of the patch if Joseph doesn't have comments
> on the actual issignaling lowerings (which I didn't review for
> correctness due to lack of knowledge).

I'd like to ping this patch.
Patch: https://gcc.gnu.org/pipermail/gcc-patches/2022-August/599697.html
with
https://gcc.gnu.org/pipermail/gcc-patches/2022-August/599794.html
https://gcc.gnu.org/pipermail/gcc-patches/2022-August/599800.html
incremental additions.
gcc/testsuite/gcc.dg/torture/builtin-issignaling-1.c's testcase f4-f7
functions (i.e. functions which just return __builtin_issignaling of
the argument which is float, double, long double and _Float128 on
x86_64-linux) with -O2 are in assembly:

        .p2align 4
        .globl  f4
        .type   f4, @function
f4:
.LFB0:
        .cfi_startproc
        movd    %xmm0, %eax
        xorl    $4194304, %eax
        andl    $2147483647, %eax
        cmpl    $2143289344, %eax
        seta    %al
        movzbl  %al, %eax
        ret
        .cfi_endproc
.LFE0:
        .size   f4, .-f4
        .p2align 4
        .globl  f5
        .type   f5, @function
f5:
.LFB1:
        .cfi_startproc
        movabsq $9221120237041090560, %rdx
        movq    %xmm0, %rax
        btcq    $51, %rax
        btrq    $63, %rax
        cmpq    %rax, %rdx
        setb    %al
        movzbl  %al, %eax
        ret
        .cfi_endproc
.LFE1:
        .size   f5, .-f5
        .p2align 4
        .globl  f6
        .type   f6, @function
f6:
.LFB2:
        .cfi_startproc
        fldt    8(%rsp)
        fstpt   -24(%rsp)
        movl    -20(%rsp), %edx
        movl    -24(%rsp), %eax
        movl    %edx, %ecx
        negl    %eax
        orl     -24(%rsp), %eax
        notl    %edx
        xorl    $1073741824, %ecx
        shrl    $31, %eax
        orl     %ecx, %eax
        movzwl  -16(%rsp), %ecx
        cmpl    $-1073741824, %eax
        movl    %ecx, %esi
        seta    %al
        notl    %ecx
        andl    $32767, %esi
        movzbl  %al, %eax
        negl    %esi
        testw   $32767, %cx
        sete    %cl
        andl    %esi, %edx
        movzbl  %cl, %ecx
        shrl    $31, %edx
        andl    %ecx, %eax
        orl     %edx, %eax
        ret
        .cfi_endproc
.LFE2:
        .size   f6, .-f6
        .p2align 4
        .globl  f7
        .type   f7, @function
f7:
.LFB3:
        .cfi_startproc
        movaps  %xmm0, -24(%rsp)
        movq    -24(%rsp), %rsi
        movq    -16(%rsp), %rdi
        movq    %rsi, %rdx
        movq    %rdi, %rax
        negq    %rdx
        btcq    $47, %rax
        orq     %rsi, %rdx
        shrq    $63, %rdx
        orq     %rdx, %rax
        movabsq $9223231299366420480, %rdx
        btrq    $63, %rax
        cmpq    %rax, %rdx
        setb    %al
        movzbl  %al, %eax
        ret
        .cfi_endproc
.LFE3:
        .size   f7, .-f7

Thanks

        Jakub

Reply via email to