[clang] [llvm] Adding splitdouble HLSL function (PR #109331)
Farzon Lotfi via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 18 08:43:19 PDT 2024
================
@@ -18957,6 +18957,134 @@ case Builtin::BI__builtin_hlsl_elementwise_isinf: {
CGM.getHLSLRuntime().getRadiansIntrinsic(), ArrayRef<Value *>{Op0},
nullptr, "hlsl.radians");
}
+ case Builtin::BI__builtin_hlsl_splitdouble: {
+
+ assert((E->getArg(0)->getType()->hasFloatingRepresentation() &&
+ E->getArg(1)->getType()->hasUnsignedIntegerRepresentation() &&
+ E->getArg(2)->getType()->hasUnsignedIntegerRepresentation()) &&
+ "asuint operands types mismatch");
+ Value *Op0 = EmitScalarExpr(E->getArg(0));
+ const auto *OutArg1 = dyn_cast<HLSLOutArgExpr>(E->getArg(1));
+ const auto *OutArg2 = dyn_cast<HLSLOutArgExpr>(E->getArg(2));
+
+ CallArgList Args;
+ auto [Op1BaseLValue, Op1TmpLValue] =
----------------
farzonl wrote:
I don't see `Op1BaseLValue` or `Op2BaseLValue` used? I see you changed the return value of `EmitHLSLOutArgExpr` to be a pair from void. Should it still be a pair return value?
https://github.com/llvm/llvm-project/pull/109331
More information about the llvm-commits
mailing list