On 2020/9/2 17:30, Richard Biener wrote: >> so maybe bypass convert_vector_to_array_for_subscript for special >> circumstance >> like "i = v[n%4]" or "v[n&3]=i" to generate vec_extract or vec_insert builtin >> call a relative simpler method? > I think you have it backward. You need to work with what > convert_vector_to_array_for_subscript > gives and deal with it during RTL expansion / optimization to generate > more optimal > code for power. The goal is to have as little target specific > builtins during the GIMPLE > optimization phase (because we cannot work out its semantics in optimizers). OK, got it, will add optabs vec_insert and expand "VIEW_CONVERT_EXPR<int[4]>(v1)[_1] = i_6(D);" expressions to rs6000_expand_vector_insert instead of builtin call. vec_extract already has optabs and "i = v[n%4]" should be in another patch after this. Thanks, Xionghu
- [PATCH] rs6000: Expand vec_insert in expand... Xiong Hu Luo via Gcc-patches
- Re: [PATCH] rs6000: Expand vec_insert ... Richard Biener via Gcc-patches
- Re: [PATCH] rs6000: Expand vec_insert ... will schmidt via Gcc-patches
- Re: [PATCH] rs6000: Expand vec_ins... luoxhu via Gcc-patches
- Re: [PATCH] rs6000: Expand vec_insert ... Segher Boessenkool
- Re: [PATCH] rs6000: Expand vec_ins... luoxhu via Gcc-patches
- Re: [PATCH] rs6000: Expand vec... Richard Biener via Gcc-patches
- Re: [PATCH] rs6000: Expand... luoxhu via Gcc-patches
- Re: [PATCH] rs6000: E... Richard Biener via Gcc-patches
- Re: [PATCH] rs600... luoxhu via Gcc-patches
- Re: [PATCH] r... Richard Biener via Gcc-patches
- Re: [PATCH] r... luoxhu via Gcc-patches
- Re: [PATCH] r... luoxhu via Gcc-patches
- Re: [PATCH] r... Richard Biener via Gcc-patches
- Re: [PATCH] r... Richard Biener via Gcc-patches
- Re: [PATCH] r... luoxhu via Gcc-patches
- Re: [PATCH] r... Segher Boessenkool
- [PATCH v2] rs... luoxhu via Gcc-patches
- Re: [PATCH v2... Richard Biener via Gcc-patches
- Re: [PATCH v2... luoxhu via Gcc-patches