[Hexagon] Fix truncation to boolean vector that need widening (#182528) When truncating a sub-HVX-width vector to a boolean vector (e.g., v64i8 -> v64i1 in 128-byte HVX mode), the operation would crash with "Unhandled HVX operation" UNREACHABLE. This happened because the condition in LowerHvxOperationWrapper/ReplaceHvxNodeResults did not handle the case where the input vector needs widening and the result is a boolean vector. The fix adds WidenHvxTruncateToBool which widens the input to HVX register width (e.g., v64i8 -> v128i8), performs the truncate to widened bool type (v128i8 -> v128i1), extracts the result subvector (v128i1 -> v64i1). This allows the widened truncate to match the existing V6_vandvrt pattern in HexagonPatternsHVX.td.
Welcome to the LLVM project!
This repository contains the source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and run-time environments.
The LLVM project has multiple components. The core of the project is itself called “LLVM”. This contains all of the tools, libraries, and header files needed to process intermediate representations and convert them into object files. Tools include an assembler, disassembler, bitcode analyzer, and bitcode optimizer.
C-like languages use the Clang frontend. This component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode -- and from there into object files, using LLVM.
Other components include: the libc++ C++ standard library, the LLD linker, and more.
Consult the Getting Started with LLVM page for information on building and running LLVM.
For information on how to contribute to the LLVM project, please take a look at the Contributing to LLVM guide.
Join the LLVM Discourse forums, Discord chat, LLVM Office Hours or Regular sync-ups.
The LLVM project has adopted a code of conduct for participants to all modes of communication within the project.