sparse-llvm load and store sizes are not handled correctly

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

 



Hi,

I have this test:

extern int printf(const char *, ...);

int main(void)
{
int x = 6;
const char txt[] = "local string %d %f %f\n";
float g = 4.2;
double e = 42.34;

printf(txt, x, g, e);

return 0;
}

When I generate the linearized output with simplifications disabled, I get:

C:\d\github\dmr_c\tests\bugs>..\..\build\Debug\linearize.exe init1.c
main:
.L0:
        <entry-point>
        store.32    $6 -> 0[x]
        load.184*   %r1 <- 0["local string %d %f %f\n"]
        store.184*  %r1 -> 0[txt]
        set.f32     %r2 <- 4.200000
        store.f32   %r2 -> 0[g]
        set.f64     %r3 <- 42.340000
        store.f64   %r3 -> 0[e]
        symaddr.64* %r4 <- txt
        set.f64     %r5 <- 4.200000
        set.f64     %r6 <- 42.340000
        push.64*    %r4
        push.32     $6
        push.f64    %r5
        push.f64    %r6
        call.32     %r7 <- printf
        phisrc.32   %phi1(return) <- $0
        br          .L1

.L1:
        phi.32      %r8 <- %phi1(return)
        ret.32      $0

What is interesting is that the load and store ops have a size that is
184 bits. This scenario is not handled by sparse-llvm correctly.

Presumably for the store here we need to copy the data? What about the load?

Thanks and Regards
Dibyendu
--
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