Re: [PATCH 1/2] V2 Give the constant pseudo value a size

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

 



Hi,

Almost a year ago I had reported a problem with Sparse simplification phase.

https://marc.info/?l=linux-sparse&m=148953605610758&w=2

Given below is a test program.

With the release Sparse 0.5.1 release, the output from test-linearizer is:

cbrtl:
ep 0x7f5a27050010: cbrtl

.L0:
bug1.c:1
        <entry-point>
        set.64      %r4 <- 0.000000
        ret.64      %r4

Now I had a hunch that the bug may be resolved when PSEUDO_VALs have a
size. So I tried the same program with Chris' git repo version.

The output is:

cbrtl:
.L0x7f4c4c3b0010:
        <entry-point>
        set.64      %r1 <- 1.000000
        set.64      %r4 <- 0.000000
        ret.64      %r4

Hurray!

I think some of the bugs in Sparse simplification phase is because all
PSEUDO_VALs with same value are considered equal - irrespective of
size!

Here is the test:

double cbrtl (double x)
{
    int hx;
    double r,s,w;
    double lt;
    unsigned sign;
    union {
 double t;
 unsigned pt[2];
    } ut, ux;
    int n0;
    ut.t = 1.0;
    n0 = (ut.pt[0] == 0);
    ut.t = 0.0;
    ux.t = x;
    return ut.t;
}

Regards
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux