[Mlir-commits] [mlir] [mlir][SPIR-V] Fix math.powf lowering for non-integer exponents (PR #197727)

Arseniy Obolenskiy llvmlistbot at llvm.org
Fri May 15 08:32:32 PDT 2026


================
@@ -360,75 +362,86 @@ struct PowFOpPattern final : public OpConversionPattern<math::PowFOp> {
     if (!dstType)
       return failure();
 
-    // Get the scalar float type.
-    FloatType scalarFloatType;
-    if (auto scalarType = dyn_cast<FloatType>(powfOp.getType())) {
-      scalarFloatType = scalarType;
-    } else if (auto vectorType = dyn_cast<VectorType>(powfOp.getType())) {
-      scalarFloatType = cast<FloatType>(vectorType.getElementType());
-    } else {
-      return failure();
+    Location loc = powfOp.getLoc();
+    auto operandType = adaptor.getRhs().getType();
----------------
aobolensk wrote:

Done

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


More information about the Mlir-commits mailing list