https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110795
Kewen Lin <linkw at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|ASSIGNED |RESOLVED --- Comment #4 from Kewen Lin <linkw at gcc dot gnu.org> --- I think this is a test case issue, with the below patch to the provided test case, it can pass the associate testing: $ diff -Nuar vec_divide.c.orig vec_divide.c --- vec_divide.c.orig 2023-07-27 01:42:20.723440140 -0500 +++ vec_divide.c 2023-07-27 01:42:33.383375622 -0500 @@ -113,7 +113,7 @@ // Then the compiler should merge the NOT with OR as ORC ge = vec_cmpge (x, z); // Combine t with (x >= z) for 33-bit compare - t = vec_or (ge, t); + ge = vec_or (ge, t); /* if (x >= z) x = x - z ; y++ */ xt = vec_sub (x, z); It tries to "deconstruct ((t || x) >= z) as (t || (x >= z))", but adopts *ge* rather than *t* as the selector for the following vec_sel, it's unexpected and the testing passed once it gets fixed. I also tried with -O2 and -Ofast with -mcpu=power10, all passed. Please reopen it if the above is just a typo and the underlying issue is covered.