File tree 2 files changed +6
-4
lines changed 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -18894,11 +18894,12 @@ case Builtin::BI__builtin_hlsl_elementwise_isinf: {
18894
18894
}
18895
18895
case Builtin::BI__builtin_hlsl_elementwise_radians: {
18896
18896
Value *Op0 = EmitScalarExpr(E->getArg(0));
18897
- if (! E->getArg(0)->getType()->hasFloatingRepresentation())
18898
- llvm_unreachable( "radians operand must have a float representation");
18897
+ assert( E->getArg(0)->getType()->hasFloatingRepresentation() &&
18898
+ "radians operand must have a float representation");
18899
18899
return Builder.CreateIntrinsic(
18900
- /*ReturnType=*/Op0->getType(), CGM.getHLSLRuntime().getRadiansIntrinsic(),
18901
- ArrayRef<Value *>{Op0}, nullptr, "hlsl.radians");
18900
+ /*ReturnType=*/Op0->getType(),
18901
+ CGM.getHLSLRuntime().getRadiansIntrinsic(), ArrayRef<Value *>{Op0},
18902
+ nullptr, "hlsl.radians");
18902
18903
}
18903
18904
}
18904
18905
return nullptr;
Original file line number Diff line number Diff line change 17
17
// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only -disable-llvm-passes -verify -DTEST_FUNC=__builtin_elementwise_tan
18
18
// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only -disable-llvm-passes -verify -DTEST_FUNC=__builtin_elementwise_tanh
19
19
// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only -disable-llvm-passes -verify -DTEST_FUNC=__builtin_elementwise_trunc
20
+ // RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only -disable-llvm-passes -verify -DTEST_FUNC=__builtin_elementwise_radians
20
21
21
22
double test_double_builtin (double p0) {
22
23
return TEST_FUNC (p0);
You can’t perform that action at this time.
0 commit comments