[llvm] [Hexagon] Fix SplitVectors crash in HVX type legalization (PR #181377)

Brian Cain via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 13 12:12:25 PST 2026


================
@@ -0,0 +1,23 @@
+; RUN: llc -mtriple=hexagon -mcpu=hexagonv73 -mattr=+hvxv73,+hvx-length128b \
----------------
androm3da wrote:

Sorry: I had `-enable-legalize-types-checking` in the `RUN` when I drafted it but must've removed it at some point.

With the updated test case and the baseline `llvm/lib/Target/Hexagon/HexagonISelLoweringHVX.cpp`:
```
$ ninja llc && ./bin/llvm-lit -v test/CodeGen/Hexagon/hvx-zext-split-check.ll
ninja: no work to do.
-- Testing: 1 tests, 1 workers --
FAIL: LLVM :: CodeGen/Hexagon/hvx-zext-split-check.ll (1 of 1)
******************** TEST 'LLVM :: CodeGen/Hexagon/hvx-zext-split-check.ll' FAILED ********************
Exit Code: 2

Command Output (stdout):
--
# RUN: at line 1
/local/mnt/workspace/upstream/obj_ubuntu/bin/llc -mtriple=hexagon -mcpu=hexagonv73 -mattr=+hvxv73,+hvx-length128b    -enable-legalize-types-checking < /local/mnt/workspace/upstream/llvm-project/llvm/test/CodeGen/Hexagon/hvx-zext-split-check.ll | /local/mnt/workspace/upstream/obj_ubuntu/bin/FileCheck /local/mnt/workspace/upstream/llvm-project/llvm/test/CodeGen/Hexagon/hvx-zext-split-check.ll
# executed command: /local/mnt/workspace/upstream/obj_ubuntu/bin/llc -mtriple=hexagon -mcpu=hexagonv73 -mattr=+hvxv73,+hvx-length128b -enable-legalize-types-checking
# .---command stderr------------
# | Unprocessed value in a map! SplitVectors
# | UNREACHABLE executed at /local/mnt/workspace/upstream/llvm-project/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp:183!
# | PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace and instructions to reproduce the bug.
# | Stack dump:
# | 0.	Program arguments: /local/mnt/workspace/upstream/obj_ubuntu/bin/llc -mtriple=hexagon -mcpu=hexagonv73 -mattr=+hvxv73,+hvx-length128b -enable-legalize-types-checking
# | 1.	Running pass 'Function Pass Manager' on module '<stdin>'.
# | 2.	Running pass 'Hexagon DAG->DAG Pattern Instruction Selection' on function '@test_zext_split'
# |  #0 0x000055a80a67e4e8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/local/mnt/workspace/upstream/obj_ubuntu/bin/llc+0x4c9f4e8)

```

https://github.com/llvm/llvm-project/pull/181377


More information about the llvm-commits mailing list