diff options
author | Luis Marques <luismarques@lowrisc.org> | 2019-09-20 13:48:02 +0000 |
---|---|---|
committer | Luis Marques <luismarques@lowrisc.org> | 2019-09-20 13:48:02 +0000 |
commit | 2d0cd6cac8403c22b29bcc7874649ff789c6c9b0 (patch) | |
tree | d7b45f6d8c7b68353b7dad0d8e14e3d630120970 /llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp | |
parent | 6c127cdb99f37069ef410ff9c7a57a76cab269a2 (diff) | |
download | bcm5719-llvm-2d0cd6cac8403c22b29bcc7874649ff789c6c9b0.tar.gz bcm5719-llvm-2d0cd6cac8403c22b29bcc7874649ff789c6c9b0.zip |
[RISCV] Fix static analysis issues
Unlikely to be problematic but still worth fixing.
Differential Revision: https://reviews.llvm.org/D67640
llvm-svn: 372391
Diffstat (limited to 'llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp')
-rw-r--r-- | llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp b/llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp index 8612af39c2e..5f93db484b3 100644 --- a/llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp +++ b/llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp @@ -374,8 +374,8 @@ public: return true; // Given only Imm, ensuring that the actually specified constant is either // a signed or unsigned 64-bit number is unfortunately impossible. - bool IsInRange = isRV64() ? true : isInt<32>(Imm) || isUInt<32>(Imm); - return IsConstantImm && IsInRange && VK == RISCVMCExpr::VK_RISCV_None; + return IsConstantImm && VK == RISCVMCExpr::VK_RISCV_None && + (isRV64() || (isInt<32>(Imm) || isUInt<32>(Imm))); } bool isUImmLog2XLen() const { |