It has been observed that memcheck reports false positives on s390x when a partially undefined value is tested with one of the TMLL, TMLH, TMHL, or TMHH instructions. These instructions test an operand against a given mask. Zero mask bits indicate that the corresponding bits in the operand shall be "don't care". But memcheck complains anyway if one of these bits is undefined and the resulting condition code is used outside the current block. One example how this may happen is like this: tmll %r5,0x0080 # condition code is generated mvc ... # new block, since mvc results in a loop jne 1f # condition code is used Let's assume that only the lowest byte of %r5 was initialized. This would be perfectly fine for the result of tmll, but memcheck would still complain. Essentially the same issue exists with TM and TMY.
These commits should fix the issue: a95ba0d6e549764d5a68536efc6eb1545b537c09 - Fixes TMxx 29f8a0ad4ed17d9cdf4a5d6661a51d25db6fc472 - Fixes TM/TMY 8d5cd244c7a81931ee17c3a7d46691774847222b - Adds a test case