File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed
llvm/lib/Target/RISCV/AsmParser Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -539,17 +539,16 @@ struct RISCVOperand final : public MCParsedAsmOperand {
539539 // True if operand is a symbol with no modifiers, or a constant with no
540540 // modifiers and isShiftedInt<N-1, 1>(Op).
541541 template <int N> bool isBareSimmNLsb0 () const {
542- int64_t Imm;
543- RISCVMCExpr::Specifier VK = RISCVMCExpr::VK_None;
544542 if (!isImm ())
545543 return false ;
546- bool IsConstantImm = evaluateConstantImm (getImm (), Imm);
547- bool IsValid;
548- if (!IsConstantImm)
549- IsValid = RISCVAsmParser::classifySymbolRef (getImm (), VK);
550- else
551- IsValid = isShiftedInt<N - 1 , 1 >(fixImmediateForRV32 (Imm, isRV64Imm ()));
552- return IsValid && VK == RISCVMCExpr::VK_None;
544+
545+ int64_t Imm;
546+ if (evaluateConstantImm (getImm (), Imm))
547+ return isShiftedInt<N - 1 , 1 >(fixImmediateForRV32 (Imm, isRV64Imm ()));
548+
549+ RISCVMCExpr::Specifier VK = RISCVMCExpr::VK_None;
550+ return RISCVAsmParser::classifySymbolRef (getImm (), VK) &&
551+ VK == RISCVMCExpr::VK_None;
553552 }
554553
555554 // True if operand is a symbol with no modifiers, or a constant with no
You can’t perform that action at this time.
0 commit comments