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

Phoebe Wang via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 5 22:54:14 PST 2025


phoebewang wrote:

This is not what I expected. We should do the check as early as in the front end. I assume we just need to add back

```
  bool IsMMXCons = llvm::StringSwitch<bool>(Constraint)
                     .Cases("y", "&y", "^Ym", true)
                     .Default(false);
  if (IsMMXCons && Ty->isVectorTy()) {
    if (cast<llvm::VectorType>(Ty)->getPrimitiveSizeInBits().getFixedValue() !=
        64) {
      // Invalid MMX constraint
      return nullptr;
    }
  }
```

in X86AdjustInlineAsmType which was removed in https://github.com/llvm/llvm-project/commit/e59a619acf0b829f34a1c63aab0ad829ca0defc9

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


More information about the llvm-commits mailing list