[PATCH] D75352: Add rsqrt op to Standard dialect and lower it to LLVM dialect.
Adrian Kuegel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 2 05:29:48 PST 2020
akuegel marked an inline comment as done.
akuegel added a comment.
PTAL. The tests seem to work now.
================
Comment at: mlir/test/Conversion/StandardToLLVM/standard-to-llvm.mlir:48
+func @rsqrt_vector(%arg0 : vector<4xf32>) {
+ // CHECK: %[[ONE:.*]] = llvm.mlir.constant(1.000000e+00 : f32) : !llvm<"<4 x float>">
+ // CHECK: %[[SQRT:.*]] = "llvm.intr.sqrt"(%arg0) : (!llvm<"<4 x float>">) -> !llvm<"<4 x float>">
----------------
Does this look ok? I am not sure whether the operand type of constant is allowed to be different from the result type. But seems there is no assert that is triggered, so maybe it supports broadcasts?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75352/new/
https://reviews.llvm.org/D75352
More information about the llvm-commits
mailing list