Skip to content

[Scalarizer] Intrinsic uadd_with_overflow should be scalarizable #126809

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

Closed
Icohedron opened this issue Feb 11, 2025 · 0 comments · Fixed by #126815
Closed

[Scalarizer] Intrinsic uadd_with_overflow should be scalarizable #126809

Icohedron opened this issue Feb 11, 2025 · 0 comments · Fixed by #126815
Labels
HLSL HLSL Language Support llvm:analysis

Comments

@Icohedron
Copy link
Contributor

Icohedron commented Feb 11, 2025

The uadd_with_overflow intrinsic should be made scalarizable.

The primary use-case that spawned this issue is to be able to have its vector form be scalarized so that it can be lowered to several UAddc DXIL ops which perform the same function on scalars.

Some issues/PRs that benefit from this change:

Issues potentially affected by this change:

@EugeneZelenko EugeneZelenko added HLSL HLSL Language Support and removed new issue labels Feb 11, 2025
@inbelic inbelic linked a pull request Feb 13, 2025 that will close this issue
inbelic pushed a commit that referenced this issue Feb 13, 2025
Addresses issue #126809

- Made `uadd_with_overflow`, `sadd_with_overflow`, `usub_with_overflow`,
`ssub_with_overflow`, `umul_with_overflow`, and `smul_with_overflow`
trivially scalarizable in `isTriviallyScalarizable()` from
`VectorUtils.cpp`
- Renamed and updated the test `Scalarizer/uadd_overflow.ll` to
`Scalarizer/uadd_with_overflow.ll` to check that `uadd_with_overflow`
gets scalarized
- Added a test `Scalarizer/sincos.ll` to ensure the bug fix #113625
still works
joaosaffran pushed a commit to joaosaffran/llvm-project that referenced this issue Feb 14, 2025
)

Addresses issue llvm#126809

- Made `uadd_with_overflow`, `sadd_with_overflow`, `usub_with_overflow`,
`ssub_with_overflow`, `umul_with_overflow`, and `smul_with_overflow`
trivially scalarizable in `isTriviallyScalarizable()` from
`VectorUtils.cpp`
- Renamed and updated the test `Scalarizer/uadd_overflow.ll` to
`Scalarizer/uadd_with_overflow.ll` to check that `uadd_with_overflow`
gets scalarized
- Added a test `Scalarizer/sincos.ll` to ensure the bug fix llvm#113625
still works
sivan-shani pushed a commit to sivan-shani/llvm-project that referenced this issue Feb 24, 2025
)

Addresses issue llvm#126809

- Made `uadd_with_overflow`, `sadd_with_overflow`, `usub_with_overflow`,
`ssub_with_overflow`, `umul_with_overflow`, and `smul_with_overflow`
trivially scalarizable in `isTriviallyScalarizable()` from
`VectorUtils.cpp`
- Renamed and updated the test `Scalarizer/uadd_overflow.ll` to
`Scalarizer/uadd_with_overflow.ll` to check that `uadd_with_overflow`
gets scalarized
- Added a test `Scalarizer/sincos.ll` to ensure the bug fix llvm#113625
still works
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
HLSL HLSL Language Support llvm:analysis
Projects
Status: Closed
Development

Successfully merging a pull request may close this issue.

4 participants