https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94557
Michael Meissner <meissner at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Ever confirmed|0 |1 Last reconfirmed| |2020-04-13 --- Comment #2 from Michael Meissner <meissner at gcc dot gnu.org> --- The issue is that with the backport patch for PR target/93932, GCC is more likely to optimize variable extracts from a vector that is in memory to be a simple load, instead of loading the vector into a vector register, and doing a vector extract on power9. The test cases rely on having indexes outside of the range of valid indexes. If the vector was loaded into a register, we would automatically mask the index as part of the extract. However, if we converted the operation to a single load, we did not do the masking, and the load would load some random value outside of the vector boundary. The trunk had previously had other changes that did this masking as part of the changes for -mcpu=future and PC-relative support. The proposed patch just makes sure the index is properly masked before it is used.