File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -18879,11 +18879,12 @@ case Builtin::BI__builtin_hlsl_elementwise_isinf: {
1887918879 }
1888018880 case Builtin::BI__builtin_hlsl_elementwise_radians: {
1888118881 Value *Op0 = EmitScalarExpr(E->getArg(0));
18882- if (! E->getArg(0)->getType()->hasFloatingRepresentation())
18883- llvm_unreachable( "radians operand must have a float representation");
18882+ assert( E->getArg(0)->getType()->hasFloatingRepresentation() &&
18883+ "radians operand must have a float representation");
1888418884 return Builder.CreateIntrinsic(
18885- /*ReturnType=*/Op0->getType(), CGM.getHLSLRuntime().getRadiansIntrinsic(),
18886- ArrayRef<Value *>{Op0}, nullptr, "hlsl.radians");
18885+ /*ReturnType=*/Op0->getType(),
18886+ CGM.getHLSLRuntime().getRadiansIntrinsic(), ArrayRef<Value *>{Op0},
18887+ nullptr, "hlsl.radians");
1888718888 }
1888818889 }
1888918890 return nullptr;
Original file line number Diff line number Diff line change 1717// 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
1818// 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
1919// 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
2021
2122double test_double_builtin (double p0) {
2223 return TEST_FUNC (p0);
You can’t perform that action at this time.
0 commit comments