I doubt it is necessary in most cases. But, to avoid unpredicatble behavior due to different compilers, it is safer to explicitly pad the value to the correct width. I would use replicated concatenation (as described in the IEEE Std 1800-2012, for example):
.in ({ {22{1'b0}}, valueA}),