On 7/11/23 20:34, juzhe.zh...@rivai.ai wrote:
Hi, Jeff.
>> Hmm, I'm not sure this is safe, especially if gimple->rtl expansion is
complete. While you might be able to get REG_EXPR, I would not really
expect SSA_NAME_DEF_STMT to be correct. At the least it'll need some
way to make sure it's not called at an inappropriate time.
I think it's safe, if SSA_NAME_DEF_STMT is NULL, then just return it.
Should this have been known_lt rather than known_le?
It should be LE, since I will pass through GET_MODE_NUNITS/GET_MODE_SIZE
for SLP.
THanks for double checking. It looked slightly odd checking ge or le.
Something's off in your formatting here. I'd guess spaces vs tabs
Ok.
In a few places you're using expand_binop. Those interfaces are really
more for gimple->RTL. BUt code like expand_gather_scatter is really
RTL, not gimple/tree. Is there a reason why you're not using pure RTL
interfaces?
I saw ARM SVE is using them in many places for expanding patterns.
And I think it's convenient so that's why I use them.
OK.
I still think we need a resolution on strided_load_store_p. As I
mentioned in my original email, I'm not sure you can depend on getting
to the SSA_NAME_DEF_STMT at this point -- in particular if it's a
dangling pointer, then bad things are going to happen. So let's chase
that down. Presumably this is called during gimple->rtl expansion,
right? Is it ever called later?
I think my concerns about expand_gather_scatter are a non-issue after
looking at it again -- I missed the GET_MODE (step) != Pmode conditional
when I first looked at that code.
jeff