On 11/15/2016 11:12 AM, Richard Sandiford wrote:
Jeff Law <l...@redhat.com> writes:
On 11/15/2016 05:42 AM, Richard Sandiford wrote:
LOAD_EXTEND_OP only applies to scalar integer modes that are narrower
than a word.  However, callers weren't consistent about which of these
checks they made beforehand, and also weren't consistent about whether
"smaller" was based on (bit)size or precision (IMO it's the latter).
This patch adds a wrapper to try to make the macro easier to use.
It's unclear to me how GET_MODE_PRECISION is different from
GET_MODE_SIZE or GET_MODE_BITSIZE.  But I haven't really thought about
it, particularly in the context of vector modes and such.  I'm certainly
willing to trust your judgment on this.

In this case it's really more about scalar integer modes than vector modes.
I think using size and precision are equivalent for MODE_INT but they can
be different for MODE_PARTIAL_INT.  Using precision allows LOAD_EXTEND_OP
to apply to (say) PSImode extensions to SImode, whereas using the size
wouldn't, since PSImode and SImode have the same (memory) size.
Ah, partial modes. No idea what the right thing to do would be. So again, I'll trust your judgment.

The only target where I had to deal with partial modes was the mn102. On that target partial modes (PSI/24 bits) are larger than the machine's natural word size (16 bits) so LOAD_EXTEND_OP didn't apply.

jeff

Reply via email to