https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101169
Kewen Lin <linkw at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |linkw at gcc dot gnu.org Component|testsuite |rtl-optimization --- Comment #4 from Kewen Lin <linkw at gcc dot gnu.org> --- The culprit change did cause some code gen regression, take a function testbc_var from fold-vec-extract-char.p7.c as example: // compiled with -O2 -mcpu=power7 #include <altivec.h> unsigned char testbc_var (vector bool char vbc2, signed int si) { return vec_extract (vbc2, si); } on both Linux and aix 64-bit, or aix 32-bit, it generates one more addi than before: sub-optimal: .L.testbc_var: li 9,48 addi 10,1,-64 stxvw4x 34,10,9 rldicl 5,5,0,60 addi 9,5,-64 // these two insns add 5,9,1 // can be optimized (see below) lbz 3,48(5) blr vs. the previous: .L.testbc_var: addi 10,1,-64 li 9,48 stxvw4x 34,10,9 rldicl 5,5,0,60 add 5,10,5 lbz 3,48(5) blr