[PATCH] D113107: Support of expression granularity for _Float16.

John McCall via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 19 10:41:04 PDT 2022


rjmccall added a comment.

IRGen has a strong postcondition about what IR types it expects specific from specific evaluations.  Scalar expression emission is expected to return a scalar of type `ConvertType(E->getType())`, and complex expression emission is expected to return a pair of scalars of type `ConvertType(E->getType()->castAs<ComplexType>()->getElementType())`.  The promoted path is an exception to this only in that it uses the promotion type instead of `E->getType()`.  To maintain that postcondition, it is necessary that promoted values do not escape from the promoted path into the unpromoted path.  Generally this means that, whenever we *start* promoted emission within an expression subtree, we must unpromote our result in.  Attempting to compensate for a broken postcondition in clients that are not aware of promoted emission would be a doomed effort; please trust my experience on this.


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

https://reviews.llvm.org/D113107



More information about the llvm-commits mailing list