diff options
author | Peng Liu <winner245@hotmail.com> | 2025-03-19 11:51:21 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-19 11:51:21 -0400 |
commit | c5195ae2d0c1f3925f48ecb0cf037d3f67d45a85 (patch) | |
tree | 6a2855e4849edadd77b568da2b0857cbf5bd7b75 /llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp | |
parent | 5720a792a950f46a9b1ebdf0b658b76dc02a9833 (diff) | |
download | llvm-c5195ae2d0c1f3925f48ecb0cf037d3f67d45a85.zip llvm-c5195ae2d0c1f3925f48ecb0cf037d3f67d45a85.tar.gz llvm-c5195ae2d0c1f3925f48ecb0cf037d3f67d45a85.tar.bz2 |
[libc++] Fix {std, ranges}::equal for vector<bool> with small storage types (#130394)
The current implementation of `{std, ranges}::equal` fails to correctly
compare `vector<bool>`s when the underlying storage type is smaller than
`int` (e.g., `unsigned char`, `unsigned short`, `uint8_t` and
`uint16_t`). See [demo](https://godbolt.org/z/j4s87s6b3)). The problem
arises due to integral promotions on the intermediate bitwise
operations, leading to incorrect final equality comparison results. This
patch fixes the issue by ensuring that `{std, ranges}::equal` operate
properly for both aligned and unaligned bits.
Fixes #126369.
Diffstat (limited to 'llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp')
0 files changed, 0 insertions, 0 deletions