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

Clarifications and alignment of vector truncations #301

Conversation

llvm-beanz
Copy link
Collaborator

@llvm-beanz llvm-beanz commented Aug 12, 2024

Previously the spec had allowed trunction conversions to produce cxvalues which enabled them to be used in output arguments. This is inconsistent with the DXC and FXC implementation, which disallows binding trunctions to output arguments.

The spec also previously did not allow trunction to scalar values. Initially that was excluded due to discussions around truncations and extensions of output arguments. Since DXC and FXC both disallow trunction in output arguments, it seems safe to support truncation to scalar here with a cooresponding warning.

This will allow the spec to more consistently align with the reference implementations.

This has no change to overload resolution except that a vector argument can be truncated to a scalar producing a Truncation, Truncation Promotion, or Truncation Conversion implicit conversion sequence.:

Previously the spec had allowed trunction conversions to produce
cxvalues which enabled them to be used in output arguments. This is
inconsistent with the DXC and FXC implementation, which disallows
binding trunctions to output arguments.

The spec also previously did not allow trunction to scalar values.
Initially that was excluded due to discussions around truncations and
extensions of output arguments. Since DXC and FXC both disallow
trunction in output arguments, it seems safe to support truncation to
scalar here with a cooresponding warning.

This will allow the spec to more consistently align with the reference
implementations.

This has no change to overload resolution except that a vector argument
can be truncated to a scalar producing a Trunctaion, Truncation
Prootion, or Truncation Conversion implicit conversion sequence.:
Copy link
Collaborator

@coopp coopp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.. and pretty interesting too. Didn't know truncation was performed here.

@damyanp
Copy link
Member

damyanp commented Aug 13, 2024

can be truncated to a scalar producing a Trunctaion, Truncation Prootion

possible typos in description?

@llvm-beanz llvm-beanz merged commit af243b0 into microsoft:main Aug 29, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants