If in complex addressing mode the difference is in GV then
base reg should not be installed because we plan to use
base reg as a merge point of different GVs.
This is a fix for PR35980.
Differential D42230
[CGP] Fix the GV handling in complex addressing mode skatkov on Jan 17 2018, 11:41 PM. Authored by
Details If in complex addressing mode the difference is in GV then This is a fix for PR35980.
Diff Detail Event TimelineComment Actions It looks like the reason we get both BaseGV and BaseReg is that matchScaledValue will use BaseReg when the scale is 1 (and BaseReg isn't already used). It may be worthwhile making it consistently use ScaledReg, as then I don't think we would run into this problem, but fixing things so we don't fail an assertion if we do happen to have both is definitely something we should do.
|
I think that the logic has gotten complex enough here that it would be clearer to split it up and invert it so we sequentially check for all the things that can't be handled (each with its own comment), something like: