Hi Tim and other reviewers,
A base register plus a wide immediate offset may not be encoded by [Base+immediate] addressing mode or ADD/SUB instructions. Currently it will be selected into [Base+0] addressing mode and generate following instructions:
MOV X0, WideImmediate ADD X1, BaseReg, X0 LDR X2, [X1, 0]
But actually we can save one ADD by generating following instructions:
MOV X0, WideImmediate LDR X2, [BaseReg, X0]
Review please.
Thanks,
-Hao
Please make this a static function.
Functions should be in camel case and start with a lower case letter.
No particularly fond of the name. How about "isPreferredXROImm" or something of that nature? (Not sold on this either, but I think it's a step in the right direction.)