-
Notifications
You must be signed in to change notification settings - Fork 11k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[flang][hlfir] Add hlfir.minval intrinsic #66306
Conversation
@llvm/pr-subscribers-flang-fir-hlfir ChangesAdds a new HLFIR operation for the MINVAL intrinsic according to the design set out in flang/docs/HighLevelFIR.md. --Patch is 63.70 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/66306.diff 9 Files Affected:
<pre> +def hlfir_MinvalOp : hlfir_Op<"minval", [AttrSizedOperandSegments,
def hlfir_ProductOp : hlfir_Op<"product", [AttrSizedOperandSegments, @@ -356,6 +357,9 @@ std::optional<hlfir::EntityWithAttributes> Fortran::lower::lowerHlfirIntrinsic(
+//===----------------------------------------------------------------------===//
+void hlfir::MinvalOp::getEffects(
//===----------------------------------------------------------------------===//
using MaxvalOpConversion = HlfirReductionIntrinsicConversion<hlfir::MaxvalOp>; +using MinvalOpConversion = HlfirReductionIntrinsicConversion<hlfir::MinvalOp>; using AllOpConversion = HlfirReductionIntrinsicConversion<hlfir::AllOp>;
+// -----
+// -----
+// -----
+// -----
+// -----
+// -----
+// -----
+// -----
+// -----
+// -----
+// -----
+// -----
+// -----
// ----- +func.func @minval_no_effects(%arg0: !hlfir.expr<?xf32>) {
+func.func @minval_effects(%arg0: !fir.ref<!fir.array<2x2xf32>>, %arg1: i32) {
func.func @dot_product_no_effects(%arg0: !hlfir.expr<?xf32>, %arg1: !hlfir.expr<?xf32>) {
+// minval with a by-ref dimension of index type
+// CHECK-DAG: %[[RET_BOX:.]] = fir.alloca !fir.box<!fir.heap<!fir.array<?xi32>>> |
9268e03
to
23b302d
Compare
Adds a new HLFIR operation for the MINVAL intrinsic according to the design set out in flang/docs/HighLevelFIR.md.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Thanks!
Adds a new HLFIR operation for the MINVAL intrinsic according to the design set out in flang/docs/HighLevelFIR.md.
Adds a new HLFIR operation for the MINVAL intrinsic according to the design set out in flang/docs/HighLevelFIR.md.