https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87678

--- Comment #3 from Uroš Bizjak <ubizjak at gmail dot com> ---
Another similar problem:

__m128
bar (__m128 x)
{
  return x + _mm_set1_ps (2.3f);
}

gcc -O2 -msse2 creates following _combine dump:

--cut here--
Trying 6 -> 7:
    6: r85:V4SF=[`*.LC0']
      REG_EQUAL const_vector
    7: r84:V4SF=r86:V4SF+r85:V4SF
      REG_DEAD r86:V4SF
      REG_DEAD r85:V4SF
Failed to match this instruction:
(set (reg:V4SF 84)
    (plus:V4SF (reg:V4SF 86)
        (const_vector:V4SF [
                (const_double:SF 2.2999999523162841796875e+0 [0x0.933333p+2])
repeated x4
            ])))

Trying 6 -> 7:
    6: r85:V4SF=const_vector
      REG_EQUAL const_vector
    7: r84:V4SF=r86:V4SF+r85:V4SF
      REG_DEAD r86:V4SF
      REG_DEAD r85:V4SF
Failed to match this instruction:
(set (reg:V4SF 84)
    (plus:V4SF (reg:V4SF 86)
        (const_vector:V4SF [
                (const_double:SF 2.2999999523162841796875e+0 [0x0.933333p+2])
repeated x4
            ])))
--cut here--

Please note that the compiler tries to combine insns twice, once with:

    6: r85:V4SF=[`*.LC0']
      REG_EQUAL const_vector

and the second time with:

    6: r85:V4SF=const_vector
      REG_EQUAL const_vector

However, memory operand is never propagated, although the pattern would accept
one.

Reply via email to