[llvm] [SelectionDAG] Fix soft-promotion of f16 BUILD_VECTOR for MSA targets (PR #210515)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 18 11:10:54 PDT 2026


================
@@ -0,0 +1,41 @@
+; RUN: llc -mtriple=mipsel-unknown-linux-gnu -mcpu=mips32r5 -mattr=+fp64,+msa < %s | FileCheck %s --check-prefix=MIPS32
+; RUN: llc -mtriple=mips64el-unknown-linux-gnuabi64 -mcpu=mips64r5 -mattr=+fp64,+msa -target-abi n64 < %s | FileCheck %s --check-prefix=MIPS64
+
+; Test that f16 vectors can be passed as arguments and returned without crashing.
+; This is a regression test for a crash in soft-promotion of BUILD_VECTOR operands.
+
+define <8 x half> @f16vec_add(<8 x half> %a, <8 x half> %b) {
+; MIPS32-LABEL: f16vec_add:
+; MIPS32:         insert.w
----------------
arsenm wrote:

Generate test checks? Do these tests really need the fadd or can they be changed to something that more obviously constructs a build_vector 

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


More information about the llvm-commits mailing list