[clang] [llvm] [SelectionDAG] Fix assertion failure on inline asm register type mismatch (PR #166615)
Phoebe Wang via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 6 03:02:27 PST 2025
================
@@ -27,6 +27,17 @@ bool IsX86_MMXType(llvm::Type *IRType) {
static llvm::Type *X86AdjustInlineAsmType(CodeGen::CodeGenFunction &CGF,
StringRef Constraint,
llvm::Type *Ty) {
+ bool IsMMXCons = llvm::StringSwitch<bool>(Constraint)
+ .Cases({"y", "&y", "^Ym"}, true)
+ .Default(false);
+ if (IsMMXCons && Ty->isVectorTy()) {
+ if (cast<llvm::VectorType>(Ty)->getPrimitiveSizeInBits().getFixedValue() !=
----------------
phoebewang wrote:
These can be combined to one `if`.
https://github.com/llvm/llvm-project/pull/166615
More information about the llvm-commits
mailing list