Landing: c3ceac8d1e16

Project / Subsystem

gcc / gcc/vect

Date

2026-08-04

Author

Tamar Christina

Commit

c3ceac8d1e1645cb5e7a2502ff17d9effce70699

Source

github

Perf win

Yes

Breaking

No

All attributes

project
gcc
subsystem
gcc/vect
patch_id
—
commit_hash
c3ceac8d1e1645cb5e7a2502ff17d9effce70699
source_type
github
headline
Simplify linear load checks using vector permutation utilities
tldr
Refactor `is_linear_load_p` to use `vec_perm_indices` for clearer and more robust checking of vector load patterns.
author
Tamar Christina
outcome
committed
performance_win
true
breaking_change
false
series_id
—
series_parts
[]
tags
  • • gcc/vect
  • • vectorization
  • • SLP
  • • aarch64
discussion_id_link
—
bugzilla_pr
—
date
2026-08-04T00:00:00.000Z

This commit refactors the is_linear_load_p function within the vectorizer to use vec_perm_indices and the series_p() helper. This change simplifies the code, making it easier to verify correctness and preventing the acceptance of invalid permutation patterns, such as the [0 2 2 2] example cited in the bug report. The function now more reliably identifies valid linear load patterns involving complex arithmetic permutations. A new test case for AArch64 is included.