File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
lib/Transforms/Instrumentation
test/Instrumentation/NumericalStabilitySanitizer Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -468,7 +468,8 @@ class ValueToShadowMap {
468468 // Floating-point constants.
469469 Type *Ty = Config.getExtendedFPType (CFP->getType ());
470470 return ConstantFP::get (
471- Ty, extendConstantFP (CFP->getValueAPF (), Ty->getFltSemantics ()));
471+ Ty, extendConstantFP (CFP->getValueAPF (),
472+ Ty->getScalarType ()->getFltSemantics ()));
472473 }
473474 // Vector, array, or aggregate constants.
474475 if (C->getType ()->isVectorTy ()) {
Original file line number Diff line number Diff line change 22; RUN: opt -passes=nsan -nsan-shadow-type-mapping=dqq -nsan-truncate-fcmp-eq=false -S %s | FileCheck %s --check-prefixes=CHECK,DQQ
33; RUN: opt -passes=nsan -nsan-shadow-type-mapping=dlq -nsan-truncate-fcmp-eq=false -S %s | FileCheck %s --check-prefixes=CHECK,DLQ
44
5+ ; RUN: opt -passes=nsan -nsan-shadow-type-mapping=dqq -nsan-truncate-fcmp-eq=false -use-constant-fp-for-fixed-length-splat -S %s | FileCheck %s --check-prefixes=CHECK,DQQ
6+ ; RUN: opt -passes=nsan -nsan-shadow-type-mapping=dlq -nsan-truncate-fcmp-eq=false -use-constant-fp-for-fixed-length-splat -S %s | FileCheck %s --check-prefixes=CHECK,DLQ
7+
58target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
69
710declare float @declaration_only (float %a ) sanitize_numerical_stability
You can’t perform that action at this time.
0 commit comments