sparse-llvm potential error in linearized output

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

 



I have the following test:

extern int printf(const char *, ...);
static char *randomletters = "agqwewbxklpfgytuorz";
int main(void)
{
 int i;
 for (i = 0; i < 20; i++) {
  int key;
  key = randomletters[i];
  printf("Inserting %d\n", key);
 }
 return 0;
}

The linearized output is:

main:
.L0:
        <entry-point>
        phisrc.32   %phi4(i) <- $0
        br          .L4
.L4:
        phi.32      %r1(i) <- %phi4(i), %phi5(i)
        setlt.32    %r2 <- %r1(i), $20
        br          %r2, .L1, .L5
.L1:
        load.64     %r3 <- 0[randomletters]
        scast.64    %r5 <- (32) %r1(i)
        add.64      %r6 <- %r3, %r5
        load.8      %r7 <- 0[%r6]
        scast.32    %r8 <- (8) %r7
        symaddr.64  %r9 <- <anon symbol:0000020914372028>
        call.32     %r11 <- printf, %r9, %r8
        add.32      %r13 <- %r1(i), $1
        phisrc.32   %phi5(i) <- %r13
        br          .L4
.L5:
        ret.32      $0

The following instruction looks incorrect to me:

        load.64     %r3 <- 0[randomletters]


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