This modifier is intended to output $r0 for (const_int 0), but the
logic:
GET_MODE (op) != TImode || (op != CONST0_RTX (TImode) && code != REG)
will reject (const_int 0) because (const_int 0) actually does not have
a mode and GET_MODE will return VOIDmode for it.
Use reg_or_0_operand instead to fix the issue.
gcc/ChangeLog:
* config/loongarch/loongarch.cc (loongarch_print_operand): Call
reg_or_0_operand for checking the sanity of %t.
break;
case 't':
- if (GET_MODE (op) != TImode
- || (op != CONST0_RTX (TImode) && code != REG))
+ if (!reg_or_0_operand (op, TImode))
{
output_operand_lossage ("invalid use of '%%%c'", letter);
break;