File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -3199,21 +3199,27 @@ std::string RISCVInstrInfo::createMIROperandComment(
3199
3199
3200
3200
// Print the full VType operand of vsetvli/vsetivli instructions, and the SEW
3201
3201
// operand of vector codegen pseudos.
3202
- if (OpInfo.OperandType == RISCVOp::OPERAND_VTYPEI10 ||
3203
- OpInfo.OperandType == RISCVOp::OPERAND_VTYPEI11) {
3202
+ switch (OpInfo.OperandType ) {
3203
+ case RISCVOp::OPERAND_VTYPEI10:
3204
+ case RISCVOp::OPERAND_VTYPEI11: {
3204
3205
unsigned Imm = Op.getImm ();
3205
3206
RISCVVType::printVType (Imm, OS);
3206
- } else if (OpInfo.OperandType == RISCVOp::OPERAND_SEW) {
3207
+ break ;
3208
+ }
3209
+ case RISCVOp::OPERAND_SEW: {
3207
3210
unsigned Log2SEW = Op.getImm ();
3208
3211
unsigned SEW = Log2SEW ? 1 << Log2SEW : 8 ;
3209
3212
assert (RISCVVType::isValidSEW (SEW) && " Unexpected SEW" );
3210
3213
OS << " e" << SEW;
3211
- } else if (OpInfo.OperandType == RISCVOp::OPERAND_VEC_POLICY) {
3214
+ break ;
3215
+ }
3216
+ case RISCVOp::OPERAND_VEC_POLICY:
3212
3217
unsigned Policy = Op.getImm ();
3213
3218
assert (Policy <= (RISCVII::TAIL_AGNOSTIC | RISCVII::MASK_AGNOSTIC) &&
3214
3219
" Invalid Policy Value" );
3215
3220
OS << (Policy & RISCVII::TAIL_AGNOSTIC ? " ta" : " tu" ) << " , "
3216
3221
<< (Policy & RISCVII::MASK_AGNOSTIC ? " ma" : " mu" );
3222
+ break ;
3217
3223
}
3218
3224
3219
3225
return Comment;
You can’t perform that action at this time.
0 commit comments