[clang] [llvm] [HLSL][DXIL][SPIRV] Create llvm dot intrinsic and use for HLSL (PR #102872)
Farzon Lotfi via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 12 09:08:12 PDT 2024
================
@@ -70,31 +71,57 @@ static bool expandAbs(CallInst *Orig) {
return true;
}
-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;
+static bool expandDotIntrinsic(CallInst *Orig, Intrinsic::ID DotIntrinsic) {
----------------
farzonl wrote:
for simplicity I would keep a seperate `expandIntegerDot` and `expandFloatDot`. Doing it this way is a little weird considering you already have a conditional to seperate behavior via the switch cases. Then you merge back only to seperate out the behaviors again via contional `if (EltTy->isIntegerTy()) {`
https://github.com/llvm/llvm-project/pull/102872
More information about the cfe-commits
mailing list