On Wed, Jan 02, 2019 at 12:15:53AM +0100, Jan Hubicka wrote: > > /vol/gcc/src/hg/trunk/local/gcc/testsuite/g++.dg/tree-prof/devirt.C:99:26: > > optimized: folding virtual function call to virtual unsigned int > > mozPersonalDictionary::_ZThn8_N21mozPersonalDictionary6AddRefEv() > > > > > Is there a way to dump files for different patterns for 32bit or 64bit > > > > Why would we: many similar scans just use _ZThn\[0-9\]+ instead. > > Becuase the testcase was formely dispatching into ZThn8 (or some other > constant I forgot) instead of ZThn16 causing wrong code. > > Well, there is runtime test that right thunk is used, so perhaps we can > just drop the part maching the actual value since most probably testcase > will ICE if wrong variant is picked again.
The testcase was written so that it aborts if it is miscompiled and succeeds otherwise, so I agree there is no urgent need for further dg-final scans on it. I don't think we have effective targets for various exact pointer sizes though, what we could do to cover most of the targets is e.g. following. Tested on x86_64-linux with both -m64 and -m32, ok for trunk? 2019-01-02 Jakub Jelinek <ja...@redhat.com> PR ipa/88561 * g++.dg/tree-prof/devirt.C: Expect _ZThn16 only for lp64 and llp64 targets and expect _ZThn8 for ilp32 targets. --- gcc/testsuite/g++.dg/tree-prof/devirt.C.jj 2019-01-01 12:14:22.973597202 +0100 +++ gcc/testsuite/g++.dg/tree-prof/devirt.C 2019-01-02 10:07:42.389899657 +0100 @@ -1,4 +1,6 @@ +/* PR ipa/88561 */ /* { dg-options "-O3 -fdump-tree-dom3-details" } */ + struct nsISupports { virtual int QueryInterface (const int &aIID, void **aInstancePtr) = 0; @@ -119,5 +121,6 @@ main () __builtin_abort (); } -/* { dg-final-use-not-autofdo { scan-tree-dump-times "folding virtual function call to virtual unsigned int mozPersonalDictionary::_ZThn16" 1 "dom3" } } */ +/* { dg-final-use-not-autofdo { scan-tree-dump-times "folding virtual function call to virtual unsigned int mozPersonalDictionary::_ZThn16" 1 "dom3" { target { lp64 || llp64 } } } } */ +/* { dg-final-use-not-autofdo { scan-tree-dump-times "folding virtual function call to virtual unsigned int mozPersonalDictionary::_ZThn8" 1 "dom3" { target ilp32 } } } */ /* { dg-final-use-not-autofdo { scan-tree-dump-times "folding virtual function call to virtual unsigned int mozPersonalDictionary::AddRef" 1 "dom3" } } */ Jakub