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 {
468
468
// Floating-point constants.
469
469
Type *Ty = Config.getExtendedFPType (CFP->getType ());
470
470
return ConstantFP::get (
471
- Ty, extendConstantFP (CFP->getValueAPF (), Ty->getFltSemantics ()));
471
+ Ty, extendConstantFP (CFP->getValueAPF (),
472
+ Ty->getScalarType ()->getFltSemantics ()));
472
473
}
473
474
// Vector, array, or aggregate constants.
474
475
if (C->getType ()->isVectorTy ()) {
Original file line number Diff line number Diff line change 2
2
; RUN: opt -passes=nsan -nsan-shadow-type-mapping=dqq -nsan-truncate-fcmp-eq=false -S %s | FileCheck %s --check-prefixes=CHECK,DQQ
3
3
; RUN: opt -passes=nsan -nsan-shadow-type-mapping=dlq -nsan-truncate-fcmp-eq=false -S %s | FileCheck %s --check-prefixes=CHECK,DLQ
4
4
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
+
5
8
target 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"
6
9
7
10
declare float @declaration_only (float %a ) sanitize_numerical_stability
You can’t perform that action at this time.
0 commit comments