Skip to content
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

Revise Usual Arithmetic Conversions #311

Merged
merged 1 commit into from
Sep 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions specs/language/expressions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,17 @@
\begin{itemize}
\item If either operand is of scoped enumeration type no conversion is
performed, and the expression is ill-formed if the types do not match.
\item If either operand is a \texttt{vector<T,X>}, vector extension is
performed with the following rules:
\item If either operand is a \texttt{vector<T,X>}, vector truncation or scalar
extension is performed with the following rules:
\begin{itemize}
\item If both vectors are of the same length, no extension is required.
\item If both vectors are of the same length, no dimension conversion is
required.
\item If one operand is a vector and the other operand is a scalar, the
scalar is extended to a vector via a Splat conversion (\ref{Conv.vsplat}).
scalar is extended to a vector via a Splat conversion (\ref{Conv.vsplat}) to
match the length of the vector.
\item Otherwise, if both operands are vectors of different lengths, the
expression is ill-formed.
vector of longer length is truncated to match the length of the shorter
llvm-beanz marked this conversation as resolved.
Show resolved Hide resolved
vector (\ref{Conv.vtrunc}).
llvm-beanz marked this conversation as resolved.
Show resolved Hide resolved
\end{itemize}
\item If either operand is of type \texttt{double} or \texttt{vector<double,
X>}, the other operator shall be converted to match.
Expand Down
Loading