performance optimization by reducing redundancy in the PTX code