diff options
author | Alex Bradbury <asb@lowrisc.org> | 2019-07-09 10:56:18 +0000 |
---|---|---|
committer | Alex Bradbury <asb@lowrisc.org> | 2019-07-09 10:56:18 +0000 |
commit | e0831dac0c3ca8539c4f91a272df65ac9c8ab32d (patch) | |
tree | 087fb8f273e607fa1a21267cbca81ac3820aa2a3 /clang/unittests/AST/ASTImporterVisibilityTest.cpp | |
parent | 65d7511f384cc7156ce904a93891ac989cb07f08 (diff) | |
download | bcm5719-llvm-e0831dac0c3ca8539c4f91a272df65ac9c8ab32d.tar.gz bcm5719-llvm-e0831dac0c3ca8539c4f91a272df65ac9c8ab32d.zip |
[RISCV] Fix RISCVTTIImpl::getIntImmCost for immediates where getMinSignedBits() > 64
APInt::getSExtValue will assert if getMinSignedBits() > 64. This can happen,
for instance, if examining an i128. Avoid this assertion by checking
Imm.getMinSignedBits() <= 64 before doing
getTLI()->isLegalAddImmediate(Imm.getSExtValue()). We could directly check
getMinSignedBits() <= 12 but it seems better to reuse the isLegalAddImmediate
helper for this.
Differential Revision: https://reviews.llvm.org/D64390
llvm-svn: 365462
Diffstat (limited to 'clang/unittests/AST/ASTImporterVisibilityTest.cpp')
0 files changed, 0 insertions, 0 deletions