> It looks like the patch also treats PSImode->SImode as a truncation though.
I'd have to check specifically for partial_int_mode, since there's nothing in PARTIAL_INT_MODE() to set the precision, unless there's some other way to set PSImode's bits *and* reliably use that info. For some reason, I've never had much luck with FRACTIONAL_INT_MODE. > If the target really wants to see TRUNCATE rtxes rather than SUBREG > rtxes then it needs to define TRULY_NOOP_TRUNCATION, probably Yeah, the base problem is that PSImode is still 32 bits. > But it looks like you handle both TRUNCATE and SUBREG: Heh. I look at the dumps to see what gcc's trying to do, then provide patterns to do that. > (I think the comment could do with some cleanup: SETs don't have modes) Yeah, but I omitted the destination, so I had to put the mode somewhere. > BTW, if SImode->PSImode is so expensive, MODES_TIEABLE_P should probably > return false for that pair of modes. That'll discourage -- but not prevent -- > the rtl optimisers from replacing (reg:PSI ...) operands with > (subreg:PSI (reg:SI ...)) ones. I'll try that. Thanks! Hmmm... psi/si in memory are tieable, psi/si in registers aren't... what's the right thing to do here?