https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64003
--- Comment #21 from Ilya Enkovich <enkovich.gnu at gmail dot com> ---
(In reply to Jeffrey A. Law from comment #20)
> Ilya, it's the function call in this code I think:
>
> (cond [(eq_attr "length_nobnd" "!0")
> (plus (symbol_ref ("ix86_bnd_prefixed_insn_p (insn)"))
> (attr "length_nobnd"))
>
> You're calling out to ix86_bnd_prefixed_insn_p, and that's problematical for
> branch shortening if I'm understanding Joern's comments here and David's
> comments in the PA port correctly.
Then we have three problematic patterns and the easiest way to handle it is to
get rid of ix86_bnd_prefixed_insn_p call in length computation for them. I
think the easiest way to do it is to have separate bnd and nobnd patterns for
these instructions. Attached patch helps me to resolve valgrind error. Is
such approach fine?