On Wed, May 15, 2013 at 7:24 PM, Mike Stump <m...@mrs.kithrup.com> wrote: > On May 15, 2013, at 1:27 AM, Richard Biener <richard.guent...@gmail.com> > wrote: >> My question is, if you end up with >> >> (truncate:PSI (reg:SI 27)) >> >> and then constant propagate 0x7fffffff to reg:SI 27, what does simplify-rtx.c >> do here? Truncate to _what_ precision exactly? > > In my world, I change PSI to be P28SI, and then answer is that there are 28 > bits. All ports that create partial int modes full well know the exact > precision, and that can be added. There is a ton of support already in the > compiler for this, and the last little bit in the mode def language and to > strap it in is light weight and obvious.
Indeed. What's the blocker to convert the existing 5 cases of PARTIAL_INT_MODE use to specify a precision? Richard. >> Recent introduction of PTImode to rs6000 makes me think that the >> PARTIAL_INT_MODE()s are a hack to simply get another name for >> TImode (in this case). >> >> Thus to the middle-end it shouldn't be >> >> (truncate:PSI (reg:SI 27)) >> >> but >> >> (set (reg:PSI 28 (reg:SI 27))) >> >> or maybe >> >> (subreg:PSI (reg:SI 27)) > > I see all forms as valid, but not the same. > > (set (reg:P28SI (reg:SI 29)) > (truncate:P28SI (reg:SI 27))) > > is natural and reasonable, which combines two of the forms above. Using > truncate is fine. > >> config/avr/avr-modes.def:FRACTIONAL_INT_MODE (PSI, 24, 3); > > I never got any joy from FRACTIONAL_INT_MODE. > >> So ... time to remove PARTIAL_INT_MODE ()s? Btw, I wonder why > > No.