[llvm] [DXIL] Implement pow lowering (PR #86733)
Farzon Lotfi via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 26 13:38:54 PDT 2024
================
@@ -197,6 +198,26 @@ static bool expandLog10Intrinsic(CallInst *Orig) {
return expandLogIntrinsic(Orig, numbers::ln2f / numbers::ln10f);
}
+static bool expandPowIntrinsic(CallInst *Orig) {
----------------
farzonl wrote:
Its a good question the reason why is `expandIntrinsic` I need to be able to return true for the intrinsics that are expanded so if we made these void returns then
```c++
switch (F.getIntrinsicID()) {
case Intrinsic::abs:
expandAbs(Orig);
return true;
...
case Intrinsic::pow:
expandPowIntrinsic(Orig);
return true;
```
Having all those return trues in the switch statement was just ugly so i moved them into the function bodies.
https://github.com/llvm/llvm-project/pull/86733
More information about the llvm-commits
mailing list