Issue 159291
Summary LLDB SVE predicate variables displayed incorrectly
Labels new issue
Assignees
Reporter yury-khrustalev
    LLDB does not display SVE predicate variables (of type `svbool_t`) correctly:

1. Even with `DW_AT_bit_stride` set correctly for `svbool_t` (see #159285), LLDB reads 1 byte for an element of the predicate vector.
2. LLDB always reads 64 bits for a predicate vector implying vector length 512 bits.

For code

```C++
svbool_t pred16 = svwhilelt_b16_u32 (0u, 5u);
```

For VL = 512 bits:

```
(lldb) p/t *(uint64_t*)&pred16
(uint64_t) 0b0000000000000000000000000000000000000000000000000000000101010101
(lldb) p pred16
(bool __attribute__((ext_vector_type(8)))) (true, true, false, false, false, false, false, false)
```

For VL = 256 bits:

```
(lldb) p/t *(uint64_t*)&pred16
(uint64_t) 0b1010101010101010000001111011010000000000000000000000000101010101
(lldb) p pred16
(bool __attribute__((ext_vector_type(8)))) (true, true, false, false, true, true, true, true)
```

Notice that LLDB treats 1st byte `01010101` as `true` and then 2nd byte `00000001` as `true` while this was supposed to be several elements.

In the second example (for VL = 256 bits) LLDB reads memory beyond 32 bits of the predicate vector.

_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to