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

Chris B via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 26 08:01:53 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();
----------------
llvm-beanz wrote:

These two variables are unused in release builds which causes a compiler warning. Can you please either fold them into the assert or mark them as maybe_unused?

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


More information about the llvm-commits mailing list