[llvm] [SelectionDAG] Fix assertion failure on inline asm register type mismatch (PR #166615)

Ahmed Nour via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 5 22:00:35 PST 2025


================
@@ -0,0 +1,20 @@
+; RUN: not llc -mtriple=x86_64-unknown-linux-gnu < %s 2>&1 | FileCheck %s
+
+; Test that using MMX register constraint 'y' (64-bit) with a 256-bit vector
+; produces a proper error message instead of an assertion failure.
+
+; CHECK: error: couldn't allocate output register for constraint 'y'
----------------
ahmednoursphinx wrote:

What would be the best way to test the specific diagnostic path? The register 
allocator's validation runs before getCopyFromPartsVector, so the specific message 
from the fix is only reached if earlier checks are bypassed.

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


More information about the llvm-commits mailing list