Skip to content

Conversation

@Sanjaykumar030
Copy link

This PR fixes the regex patterns used to detect VSX3 and VSX4 CPU features
in the ppc64 Meson build scripts. Previously, the regex used a character
class:

'.*[mcpu=|vsx].*'

This incorrectly matched individual characters instead of the intended
substrings "mcpu=" or "vsx".

Changes made:

  • Updated the regex to use a non-capturing group with alternation:

    '.*(?:mcpu=|vsx).*'
    
  • No changes were made to feature hierarchy, test code, extra tests, or
    compiler flags.

This ensures that the build system correctly detects VSX3/VSX4 features
on both GCC and Clang compilers on ppc64 platforms.


Before:

  • VSX3/VSX4 detection could fail or mis-detect features because of
    improper regex.

After:

  • Regex properly matches either "mcpu=" or "vsx" as intended.
  • Extra tests and compiler flags remain unchanged.

@charris charris changed the title FIX: Correct regex for ppc64 VSX3/VSX4 feature detection BUG: Correct regex for ppc64 VSX3/VSX4 feature detection Sep 5, 2025
@charris charris changed the title BUG: Correct regex for ppc64 VSX3/VSX4 feature detection BUG, BLD: Correct regex for ppc64 VSX3/VSX4 feature detection Sep 5, 2025
@charris charris added 00 - Bug 36 - Build Build related PR 09 - Backport-Candidate PRs tagged should be backported labels Sep 5, 2025
@charris charris merged commit 8339bce into numpy:main Sep 5, 2025
77 checks passed
@Sanjaykumar030
Copy link
Author

Thank you, @charris, for the review, and the merge! I appreciate the opportunity to contribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

00 - Bug 36 - Build Build related PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants