[flang-commits] [flang] [flang]: This is to fix the HLFIR path for PPC Vector type intrinsics. (PR #66547)

Daniel Chen via flang-commits flang-commits at lists.llvm.org
Mon Sep 18 08:28:59 PDT 2023


================
@@ -165,7 +170,7 @@ inline bool isa_char(mlir::Type t) { return t.isa<fir::CharacterType>(); }
 /// Is `t` a trivial intrinsic type? CHARACTER is <em>excluded</em> because it
 /// is a dependent type.
 inline bool isa_trivial(mlir::Type t) {
-  return isa_integer(t) || isa_real(t) || isa_complex(t) ||
+  return isa_integer(t) || isa_real(t) || isa_complex(t) || isa_vector(t) ||
----------------
DanielCChen wrote:

> Why is a vector trivial? Vectors can be containers for other types and could be very large in memory

We added vector types for PowerPC and a set of intrinsics that operate on PowerPC vector types. The vector type added has a fixed size of 16 bytes. Its element type can be `integer`, `real`, or `unsigned`(new). It is lowered into `fir::VectorType` and `mlir::VectorType`. The vector type needs to be treated as an intrinsic type. The above change is to ensure that. One example is to allow the `asValue` argument in `ppcHandlers` for vector type intrinsics.

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


More information about the flang-commits mailing list