Skip to content

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
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.
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.

2 participants