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

jseward at acm dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jseward at acm dot org

--- Comment #4 from jseward at acm dot org ---
This seems to me to be another rerun of the movie where a program does
integer equality on partially defined operands, and still produces a
defined result.  Memcheck can already deal with this, but doesn't do so
for 64-bit compares on amd64 by default, since it's expensive.

In memcheck/mc_translate.c, around line 8354, find this

#     if defined(VGA_x86)
      mce.dlbo.dl_Add32           = DLauto;
      mce.dlbo.dl_CmpEQ32_CmpNE32 = DLexpensive;
#     elif defined(VGA_amd64)
      mce.dlbo.dl_Add64           = DLauto;
      mce.dlbo.dl_CmpEQ32_CmpNE32 = DLexpensive;
#     elif defined(VGA_ppc64le)
      // Needed by (at least) set_AV_CR6() in the front end.                    
      mce.dlbo.dl_CmpEQ64_CmpNE64 = DLexpensive;
#     endif

and add to the VGA_amd64 case:

      mce.dlbo.dl_CmpEQ64_CmpNE64 = DLexpensive;

That should make it run clean even without using
--expensive-definedness-checks=yes.  Does it?

Reply via email to