While debugging in RemixIDE with 'optimize=true', I noticed that the Solidity code address(0xAAAA) generates the following opcodes, which only compute 20 bytes 1s:
PUSH1 0x1
PUSH1 0x1
PUSH1 0xa0
SHL
SUB
I found in the ConstantOptimiser.cpp file in the Solidity repo that there is a method called 'findRepresentation', which decomposes constants larger than 255. Doesn't this consume more gas than directly pushing the constant? Why is this optimization performed?