[clang] [llvm] [DXIL] `exp`, `any`, `lerp`, & `rcp` Intrinsic Lowering (PR #84526)

Farzon Lotfi via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 13 14:52:58 PDT 2024


================
@@ -5254,7 +5250,11 @@ bool CheckAllArgsHaveFloatRepresentation(Sema *S, CallExpr *TheCall) {
   QualType ExpectedType = S->Context.FloatTy;
   for (unsigned i = 0; i < TheCall->getNumArgs(); ++i) {
     QualType PassedType = TheCall->getArg(i)->getType();
-    if (!PassedType->hasFloatingRepresentation()) {
+    ExpectedType = PassedType->isHalfType() && S->getLangOpts().NativeHalfType
+                       ? S->Context.HalfTy
+                       : S->Context.FloatTy;
+    if (PassedType == S->Context.DoubleTy ||
+        !PassedType->hasFloatingRepresentation()) {
----------------
farzonl wrote:

I have a solution I think will make things more clear.

https://github.com/llvm/llvm-project/pull/84526


More information about the cfe-commits mailing list