[all-commits] [llvm/llvm-project] aa9679: [flang] Change return type of reduction intrinsics

Jacob Crawley via All-commits all-commits at lists.llvm.org
Fri May 19 07:36:08 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: aa9679304011170905a37758c6ce5c0c6e7a6265
      https://github.com/llvm/llvm-project/commit/aa9679304011170905a37758c6ce5c0c6e7a6265
  Author: Jacob Crawley <jacob.crawley at arm.com>
  Date:   2023-05-19 (Fri, 19 May 2023)

  Changed paths:
    M flang/include/flang/Optimizer/HLFIR/HLFIROps.td
    M flang/lib/Lower/ConvertCall.cpp
    M flang/lib/Optimizer/HLFIR/IR/HLFIROps.cpp
    M flang/test/HLFIR/any-lowering.fir
    M flang/test/HLFIR/any.fir
    M flang/test/HLFIR/flang-experimental-hlfir-flag.f90
    M flang/test/HLFIR/invalid.fir
    M flang/test/HLFIR/product-lowering.fir
    M flang/test/HLFIR/product.fir
    M flang/test/HLFIR/sum-lowering.fir
    M flang/test/HLFIR/sum.fir
    M flang/test/Lower/HLFIR/any.f90
    M flang/test/Lower/HLFIR/product.f90
    M flang/test/Lower/HLFIR/sum.f90

  Log Message:
  -----------
  [flang] Change return type of reduction intrinsics

Comments in the recent patch https://reviews.llvm.org/D149964,
mentioned that using hlfir_ExprType in cases where intrinsics
return simple scalars adds unnecessary abstraction that isn't
needed unless an array type is being used.

This patch modifies the HLFIR operations for product, sum and any
so that they only return a hlfir_ExprType when the result is an array,
otherwise they will return just the simple scalar type.

Differential Revision: https://reviews.llvm.org/D150877




More information about the All-commits mailing list