cse.c:hash_rtx has the same problem as found before in cse.c:cselib_hash_rtx (PR rtl-optimization/22445). Hence, some optimiztions will only be done if there is a convenient hash collision. I.e. the MODE should not be used to calculate the hash value.