Skip to content

Revert "[AMDGPU][CodeGenPrepare] Narrow 64 bit math to 32 bit if profitable" #133880

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

Merged
merged 1 commit into from
Apr 1, 2025

Conversation

Shoreshen
Copy link
Contributor

Reverts #130577

@Shoreshen Shoreshen merged commit 7f14b2a into main Apr 1, 2025
12 checks passed
@Shoreshen Shoreshen deleted the revert-130577-narrow-math-for-and-operand branch April 1, 2025 09:37
@Shoreshen Shoreshen restored the revert-130577-narrow-math-for-and-operand branch April 1, 2025 09:37
@Shoreshen Shoreshen deleted the revert-130577-narrow-math-for-and-operand branch April 1, 2025 09:37
Ankur-0429 pushed a commit to Ankur-0429/llvm-project that referenced this pull request Apr 2, 2025
Shoreshen added a commit that referenced this pull request Apr 17, 2025
Re-apply #130577

Which is reverted in #133880

The old application failed in address sanitizer due to
`tryNarrowMathIfNoOverflow` was called after `I.eraseFromParent();` in
`AMDGPUCodeGenPrepareImpl::visitBinaryOperator`, it create a use after
free failure.

To fix this, `tryNarrowMathIfNoOverflow` will be called before and
directly return if `tryNarrowMathIfNoOverflow` result in true.
llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request Apr 17, 2025
Re-apply llvm/llvm-project#130577

Which is reverted in llvm/llvm-project#133880

The old application failed in address sanitizer due to
`tryNarrowMathIfNoOverflow` was called after `I.eraseFromParent();` in
`AMDGPUCodeGenPrepareImpl::visitBinaryOperator`, it create a use after
free failure.

To fix this, `tryNarrowMathIfNoOverflow` will be called before and
directly return if `tryNarrowMathIfNoOverflow` result in true.
var-const pushed a commit to ldionne/llvm-project that referenced this pull request Apr 17, 2025
Re-apply llvm#130577

Which is reverted in llvm#133880

The old application failed in address sanitizer due to
`tryNarrowMathIfNoOverflow` was called after `I.eraseFromParent();` in
`AMDGPUCodeGenPrepareImpl::visitBinaryOperator`, it create a use after
free failure.

To fix this, `tryNarrowMathIfNoOverflow` will be called before and
directly return if `tryNarrowMathIfNoOverflow` result in true.
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.

1 participant