Summary: | False Memcheck reports on gcc -O1 optimizations around CMP instructions. | ||
---|---|---|---|
Product: | [Developer tools] valgrind | Reporter: | Timur Iskhodzhanov <timurrrr> |
Component: | memcheck | Assignee: | Julian Seward <jseward> |
Status: | RESOLVED WORKSFORME | ||
Severity: | normal | CC: | pjfloyd |
Priority: | NOR | ||
Version: | 3.7 SVN | ||
Target Milestone: | --- | ||
Platform: | Unlisted Binaries | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | experimental patch to enable expensive checks via command |
Description
Timur Iskhodzhanov
2011-02-15 17:53:27 UTC
> Is it OK that these literals are not considered "bogus"? It's always OK to use the expensive cmpEQ/NE versions, if that's what you mean. > With this patch my Chromium tests run about ~10% slower. 10% loss is a lot to pay for a (very) small gain in accuracy. > I believe it's possible to do something which is still fast enough yet correct. Well, that would be nice. Have you got any details? > It's always OK to use the expensive cmpEQ/NE versions, if that's what > you mean. Yes. >> With this patch my Chromium tests run about ~10% slower. >> I believe it's possible to do something which is still >> fast enough yet correct. > 10% loss is a lot to pay for a (very) small gain in accuracy. > Well, that would be nice. Absolutely, 10% is not worth it. But if it's possible to do it with 1% - I want it. > Have you got any details? Nope, I'm not that familiar with the Memcheck code. Maybe you can find something out? Created attachment 57279 [details]
experimental patch to enable expensive checks via command
During the port of s390x I was experimenting with this patch for fix partiallydefineq. I finally fixed it differently, but this patch might be another way to solve your problem
I'm not sure what changed or when but I get gcc (GCC) 12.0.1 20220420 (experimental) [was at or close to the 12.0.1 release version] objdump --disassemble=foo bug266389 0000000000401130 <foo>: 401130: 81 7f 04 34 12 78 56 cmpl $0x56781234,0x4(%rdi) 401137: 0f 94 c0 sete %al 40113a: c3 ret No change there ~/tools/valgrind/bin/valgrind -q ./bug266389 [no output] |