Fixes a bug that was resulting in an incorrect global instr count.
The PR also replaces the sample's existing sanity test with a more comprehensive regression test.
Issue: #4326 (closed) #4372
Fixes a bug that was resulting in an incorrect global instr count.
The PR also replaces the sample's existing sanity test with a more comprehensive regression test.
Issue: #4326 (closed) #4372