Index: llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp =================================================================== --- llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp +++ llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp @@ -647,7 +647,8 @@ const TargetRegisterInfo *RI = STI->getRegisterInfo(); Register Reg = MO.getReg(); unsigned RegToPrint = RC->getRegister(RI->getEncodingValue(Reg)); - assert(RI->regsOverlap(RegToPrint, Reg)); + if (!RI->regsOverlap(RegToPrint, Reg)) + return true; O << AArch64InstPrinter::getRegisterName(RegToPrint, AltName); return false; } Index: llvm/test/CodeGen/AArch64/inline-asm-constraints-bad-sve.ll =================================================================== --- llvm/test/CodeGen/AArch64/inline-asm-constraints-bad-sve.ll +++ llvm/test/CodeGen/AArch64/inline-asm-constraints-bad-sve.ll @@ -6,6 +6,7 @@ ; CHECK: error: couldn't allocate input reg for constraint 'Upa' ; CHECK: error: couldn't allocate input reg for constraint 'r' ; CHECK: error: couldn't allocate output register for constraint 'w' +; CHECK: error: unknown token in expression define @foo1(i32 *%in) { entry: @@ -27,3 +28,11 @@ %1 = call asm sideeffect "mov $0.b, $1.b \0A", "=&w,w"( %0) ret %1 } + +define half @foo4( *%inp, *%inv) { +entry: + %0 = load , * %inp, align 2 + %1 = load , * %inv, align 16 + %2 = call half asm "fminv ${0:p}, $1, $2.h", "=r,@3Upl,w"( %0, %1) #1 + ret half %2 +}