[clang] [llvm] [DXIL] implement dot intrinsic lowering for integers (PR #85662)

Farzon Lotfi via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 26 09:06:28 PDT 2024


================
@@ -39,11 +39,44 @@ static bool isIntrinsicExpansion(Function &F) {
   case Intrinsic::dx_uclamp:
   case Intrinsic::dx_lerp:
   case Intrinsic::dx_rcp:
+  case Intrinsic::dx_sdot:
+  case Intrinsic::dx_udot:
     return true;
   }
   return false;
 }
 
+static bool expandIntegerDot(CallInst *Orig, Intrinsic::ID DotIntrinsic) {
+  assert(DotIntrinsic == Intrinsic::dx_sdot ||
+         DotIntrinsic == Intrinsic::dx_udot);
+  Intrinsic::ID MadIntrinsic = DotIntrinsic == Intrinsic::dx_sdot
+                                   ? Intrinsic::dx_imad
+                                   : Intrinsic::dx_umad;
+  Value *A = Orig->getOperand(0);
+  Value *B = Orig->getOperand(1);
+  Type *ATy = A->getType();
+  Type *BTy = B->getType();
----------------
farzonl wrote:

https://github.com/llvm/llvm-project/pull/90226/files

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


More information about the cfe-commits mailing list