Hi Richard, Thanks a lot for your review and reply, I've updated the patch accordingly. Main changes compared to previous one: - Consider SVE (poly_int) on bit_field_ref size/offset. - Filter valid candidates with sbitmap first. - Support multiple modes (TODO 1). - Test cases: add SSE2 support for 1..5, update run result check for 1, add two more cases (5,6)to verify multiple mode support (x86). Bootstrapped and regression test passed on powerpc64le-unknown-linux-gnu and x86_64-linux-gnu. Could you help to review it again? Thanks in advance! Kewen ---- gcc/ChangeLog 2019-07-08 Kewen Lin PR tree-optimization/88497 * tree-ssa-reassoc.c (reassociate_bb): Swap the positions of GIMPLE_BINARY_RHS check and gimple_visited_p check, call new function undistribute_bitref_for_vector. (undistribute_bitref_for_vector): New function. (cleanup_vinfo_map): Likewise. (sort_by_mach_mode): Likewise. gcc/testsuite/ChangeLog 2019-07-08 Kewen Lin * gcc.dg/tree-ssa/pr88497-1.c: New test. * gcc.dg/tree-ssa/pr88497-2.c: Likewise. * gcc.dg/tree-ssa/pr88497-3.c: Likewise. * gcc.dg/tree-ssa/pr88497-4.c: Likewise. * gcc.dg/tree-ssa/pr88497-5.c: Likewise. * gcc.dg/tree-ssa/pr88497-6.c: Likewise. * gcc.dg/tree-ssa/pr88497-7.c: Likewise.