Re: [PATCH][CFT][experimental] net/socket.c: use straight fdget/fdput (resend)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, May 27, 2024 at 05:31:16PM +0100, Al Viro wrote:

> Hell knows; let me play with that a bit and let's see what falls out...

gcc optimizer is... interesting:

if (v & 1)
        if (!(v & 3))
                foo();

is *NOT* collapsed into a no-op.  Not even

if (v & 1)
        if (!(v & 1) && !(v & 2))
                foo();

is good enough for it.

if (v & 1)
        if (!(v & 1))
                if (!(v & 2))
                        foo();

is recognized, thankfully, but... WTF?  As far as I can tell,
        if (!(v & 1) && !(v & 2))
gets turned into if (!(v & 3)), and then gcc gets stuck on that.
        if (!(v & 1)) if (!(v & 2))
is turned into the same, but apparently only after it actually
looks at both parts in context of what it knows about the earlier
checks.

clang handles all forms just fine, but gcc does not ;-/




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux