int foo(vector float x, vector float y) { if (vec_all_eq(x,y)) return 3245; else return 12; }
Right now we produce: vcmpeqfp. v3,v2,v3 li r3,3245 mfcr r0 rlwinm r0,r0,25,1 cmpwi cr7,r0,0 bnelr+ cr7 li r3,12 blr But we should be able to produce something like the following: vcmpeqfp. v3,v2,v3 cmpwi cr6,r0,0 li r3,3245 bnelr+ cr7 li r3,12 blr This might be because of there is no such thing as BI modes on powerpc but I don't know for sure. -- Summary: vec_all_eq does not produce good result Product: gcc Version: 4.1.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: minor Priority: P2 Component: target AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pinskia at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org GCC target triplet: powerpc*-* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22077