File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -959,17 +959,17 @@ unsigned RISCVCC::getBrCond(RISCVCC::CondCode CC,
959959 default :
960960 llvm_unreachable (" Unknown condition code!" );
961961 case RISCVCC::COND_EQ:
962- if (Imm && FeatureBits[RISCV::FeatureVendorXCVbi])
962+ if (!Imm)
963+ return RISCV::BEQ;
964+ if (FeatureBits[RISCV::FeatureVendorXCVbi])
963965 return RISCV::CV_BEQIMM;
964- else
965- llvm_unreachable (" Unknown branch immediate!" );
966- return RISCV::BEQ;
966+ llvm_unreachable (" Unknown branch immediate!" );
967967 case RISCVCC::COND_NE:
968- if (Imm && FeatureBits[RISCV::FeatureVendorXCVbi])
968+ if (!Imm)
969+ return RISCV::BNE;
970+ if (FeatureBits[RISCV::FeatureVendorXCVbi])
969971 return RISCV::CV_BNEIMM;
970- else
971- llvm_unreachable (" Unknown branch immediate!" );
972- return RISCV::BNE;
972+ llvm_unreachable (" Unknown branch immediate!" );
973973 case RISCVCC::COND_LT:
974974 return RISCV::BLT;
975975 case RISCVCC::COND_GE:
You can’t perform that action at this time.
0 commit comments