forked from OSchip/llvm-project
[mlir][StandardToSPIRV] Add support for lowering math.powf to SPIR-V.
Reviewed By: antiagainst Differential Revision: https://reviews.llvm.org/D100403
This commit is contained in:
parent
91b6ef64db
commit
d9b03ef2e8
|
@ -1266,6 +1266,7 @@ void populateStandardToSPIRVPatterns(SPIRVTypeConverter &typeConverter,
|
|||
UnaryAndBinaryOpPattern<math::ExpOp, spirv::GLSLExpOp>,
|
||||
UnaryAndBinaryOpPattern<math::LogOp, spirv::GLSLLogOp>,
|
||||
UnaryAndBinaryOpPattern<math::RsqrtOp, spirv::GLSLInverseSqrtOp>,
|
||||
UnaryAndBinaryOpPattern<math::PowFOp, spirv::GLSLPowOp>,
|
||||
UnaryAndBinaryOpPattern<math::SinOp, spirv::GLSLSinOp>,
|
||||
UnaryAndBinaryOpPattern<math::SqrtOp, spirv::GLSLSqrtOp>,
|
||||
UnaryAndBinaryOpPattern<math::TanhOp, spirv::GLSLTanhOp>,
|
||||
|
|
|
@ -81,6 +81,8 @@ func @float32_binary_scalar(%lhs: f32, %rhs: f32) {
|
|||
%3 = divf %lhs, %rhs: f32
|
||||
// CHECK: spv.FRem %{{.*}}, %{{.*}}: f32
|
||||
%4 = remf %lhs, %rhs: f32
|
||||
// CHECK: spv.GLSL.Pow %{{.*}}: f32
|
||||
%5 = math.powf %lhs, %rhs : f32
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue