https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103316
--- Comment #3 from Bill Schmidt <wschmidt at gcc dot gnu.org> --- Sure. Consider: #include <altivec.h> vector bool __int128 foo (vector signed __int128 a, vector signed __int128 b) { return vec_cmpgt (a, b); } With gimple folding we emulate in 64-bit mode: mfvsrd 9,34 mfvsrld 8,34 mfvsrd 11,35 mfvsrld 10,35 li 7,1 cmpd 0,9,11 bgt 0,.L2 cmpld 0,9,11 beq 0,.L5 .L3: li 7,0 .L2: subfic 10,7,0 subfe 11,11,11 mtvsrdd 34,11,10 blr .p2align 4,,15 .L5: cmpld 0,8,10 bgt 0,.L2 b .L3 The desired code generation is just vcmpgtsq 2,2,3