On 03/28/2013 08:03 AM, Aurelien Jarno wrote: >> Since we have a free temporary and can always just load the constant, we >> > ought to do so, rather than spending the same effort constraining the >> > const. > Is it really a good idea doing so? If a constraint can't be satisfied > the TCG code will also load the constant in a register, with the > difference that the register is not trashed and might be reused later > instead of reloading the constant again. Of course it means one more > register available, but the S390 target doesn't really have issues > with the number of available registers. >
My main thinking is along the lines you yourself pointed out when the code was first written -- it's really quite hard to figure out what constants are implementable for AND. It gets even worse with a patch further in the series that uses ROTATE AND INSERT SELECTED BITS. It's complicated enough that it *seems* better to just go ahead and accept all constants. Even from a maintainence point of view -- we no longer have to have two big functions match up. r~