[llvm-dev] Instruction selection for 'load' based on static vs. dynamic data
Dr. ERDI Gergo via llvm-dev
llvm-dev at lists.llvm.org
Tue May 9 22:23:53 PDT 2017
On Tue, 9 May 2017, Krzysztof Parzyszek wrote:
> On 5/9/2017 8:16 AM, Dr. ERDI Gergo wrote:
>>
>> Can I also use something more complex than a single machine load
>> instruction here? I.e. can I write something like
>>
>> def: Pat<(ld (add (WRAPPER RC:$addr), (sign_extend RC:$offset))),
>> (load_instruction_rr (special_add RC:$addr, RC:$offset))>;
>>
>> ? Or do I have to go via some pseudo-instruction for that?
>
> You can have any tree of machine instructions as the output.
Thanks, I managed to get it working using this approach; see
https://github.com/gergoerdi/llvm-avr/commit/bf415da65d102d86596753a541af8804b863928b
if you're interested in the details.
More information about the llvm-dev
mailing list