Skip to content

Conversation

@charris
Copy link
Member

@charris charris commented Jul 5, 2023

Backport of #24054.

The case occurs whenever a multiply or divide occurs (array * scalar) using SIMD and not a full vector can be used. The remaining lanes get zeroed, which can cause divide-by-zero or invalid to be raised.

Xcode 14.3 includes an updated clang that supports FP Strict for arm64, which does not have any issues.

Previous versions of Xcode / clang have incorrect codegen for this case.

…ivide-by-zero

The case occurs whenever a multiple or divide occurs (`array * scalar`) using SIMD and not a full vector can be used.  The remaining lanes get zeroed, which can cause divide-by-zero or invalid to be raised.

Xcode 14.3 includes an updated clang that supports FP Strict for arm64, which does not have any issues.

Previous versions of Xcode / clang have incorrect codegen for this case.
@charris charris added 00 - Bug 08 - Backport Used to tag backport PRs labels Jul 5, 2023
@charris charris added this to the 1.25.1 release milestone Jul 5, 2023
@charris charris merged commit eb1075b into numpy:maintenance/1.25.x Jul 5, 2023
@charris charris deleted the backport-24054 branch July 5, 2023 19:23
@charris charris changed the title BUG: Multiple or Divides using SIMD without a full vector can cause divide-by-zero BUG: Multiply or Divides using SIMD without a full vector can cause divide-by-zero Jul 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

00 - Bug 08 - Backport Used to tag backport PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants