Re: [PATCH v4 2/2] x86: Add vec_duplicate expander

2021-06-09 Thread H.J. Lu via Gcc-patches
+ bool ok = ix86_expand_vector_init_duplicate (false, +GET_MODE (operands[0]), +operands[0], +operands[1]); + gcc_assert (ok); -- H.J. From 66e4cc1a22c00afd09abc30220a189de7840e6e6 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Mon, 7 Jun 2021 14:23:04 -0700 Subject: [PATCH v4 2/2] x8

[PATCH v4 2/2] x86: Add vec_duplicate expander

2021-06-09 Thread H.J. Lu via Gcc-patches
1. Update vec_duplicate to allow to fail so that backend can only allow broadcasting an integer constant to a vector when broadcast instruction is available. This can be used by memset expander to avoid vec_duplicate when loading from constant pool is more efficient. 2. Add vec_duplicate expander