Skip to content

Commit f5c26f5

Browse files
committed
address pr comments
1 parent b21e880 commit f5c26f5

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

clang/lib/CodeGen/CGBuiltin.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18073,8 +18073,7 @@ Value *CodeGenFunction::EmitHLSLBuiltinExpr(unsigned BuiltinID,
1807318073
}
1807418074
if (!E->getArg(0)->getType()->hasFloatingRepresentation())
1807518075
llvm_unreachable("isinf operand must have a float representation");
18076-
return Builder.CreateIntrinsic(
18077-
/*ReturnType=*/retType, Intrinsic::dx_isinf, ArrayRef<Value *>{Op0},
18076+
return Builder.CreateIntrinsic(retType, Intrinsic::dx_isinf, ArrayRef<Value *>{Op0},
1807818077
nullptr, "dx.isinf");
1807918078
}
1808018079
case Builtin::BI__builtin_hlsl_mad: {

clang/lib/Sema/SemaChecking.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5268,7 +5268,7 @@ bool CheckAllArgsHaveFloatRepresentation(Sema *S, CallExpr *TheCall) {
52685268
return false;
52695269
}
52705270

5271-
void SetInputRepresentationReturnType(Sema *S, CallExpr *TheCall,
5271+
void SetElementTypeAsReturnType(Sema *S, CallExpr *TheCall,
52725272
QualType ReturnType) {
52735273
auto *VecTyA = TheCall->getArg(0)->getType()->getAs<VectorType>();
52745274
if (VecTyA)
@@ -5300,7 +5300,7 @@ bool Sema::CheckHLSLBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) {
53005300
return true;
53015301
if (CheckAllArgsHaveFloatRepresentation(this, TheCall))
53025302
return true;
5303-
SetInputRepresentationReturnType(this, TheCall, this->Context.BoolTy);
5303+
SetElementTypeAsReturnType(this, TheCall, this->Context.BoolTy);
53045304
break;
53055305
case Builtin::BI__builtin_hlsl_elementwise_rcp:
53065306
case Builtin::BI__builtin_hlsl_elementwise_frac: {

0 commit comments

Comments
 (0)