This PR is about the rs6000 backend emitting wrong assembly
for whole vector shift by 0, and while I think it is desirable
to fix the backend, I don't see a point why the expander should
try to emit that, whole vector shift by 0 is identity, we can just
return the operand.
2020-04-23 Jakub Jelinek <jakub@redhat.com>
PR target/94710
* optabs.c (expand_vec_perm_const): For shift_amt const0_rtx
just return v2.
2020-04-23 Jakub Jelinek <jakub@redhat.com>
+ PR target/94710
+ * optabs.c (expand_vec_perm_const): For shift_amt const0_rtx
+ just return v2.
+
PR middle-end/94724
* tree.c (get_narrower): Instead of creating COMPOUND_EXPRs
temporarily with non-final second operand and updating it later,
if (shift_amt)
{
class expand_operand ops[3];
+ if (shift_amt == const0_rtx)
+ return v2;
if (shift_code != CODE_FOR_nothing)
{
create_output_operand (&ops[0], target, mode);