forked from OSchip/llvm-project
[SVE]Fix implicit TypeSize casts in EmitCheckValue
Using TypeSize::getFixedSize() instead of relying upon the implicit TypeSize->uint64_cast as the type is always fixed width. Differential Revision: https://reviews.llvm.org/D89313
This commit is contained in:
parent
8f0ddd4a1a
commit
145e44bb18
|
@ -2996,7 +2996,7 @@ llvm::Value *CodeGenFunction::EmitCheckValue(llvm::Value *V) {
|
|||
// Floating-point types which fit into intptr_t are bitcast to integers
|
||||
// and then passed directly (after zero-extension, if necessary).
|
||||
if (V->getType()->isFloatingPointTy()) {
|
||||
unsigned Bits = V->getType()->getPrimitiveSizeInBits();
|
||||
unsigned Bits = V->getType()->getPrimitiveSizeInBits().getFixedSize();
|
||||
if (Bits <= TargetTy->getIntegerBitWidth())
|
||||
V = Builder.CreateBitCast(V, llvm::Type::getIntNTy(getLLVMContext(),
|
||||
Bits));
|
||||
|
|
Loading…
Reference in New Issue