Refer to Table 3-8 in the NIOS II Processor Reference Handbook Programming Model - there are a whole host of bits in there which may be set. For example, the NMI bit, the shadow register bits etc...
The code you posted is only interested in the state of bit 0 (the PIE bit), so it masks off the other bits.