[PATCH] D99037: [Matrix] Implement C-style explicit type conversions for matrix types

Florian Hahn via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 5 12:45:04 PDT 2021


fhahn added inline comments.


================
Comment at: clang/lib/CodeGen/CGExprScalar.cpp:1324
+
+    if (SrcElementTy->isFloatTy() || SrcElementTy->isDoubleTy()) {
+      QualType DstElementType = DstType->castAs<MatrixType>()->getElementType();
----------------
I think we should support all floating point type here (`isFloatingPointTy`). Basically we want the same rules as for integer types (around line 1418). Perhaps it would be possible to generalize this code in a separate function that takes the LLVM types & the element type/scalar types?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D99037/new/

https://reviews.llvm.org/D99037



More information about the cfe-commits mailing list