Displaying 4 results from an estimated 4 matches for "l2_loadruh_io".
2017 Jul 28
2
Tail merging "undef" with a defined register: wrong code
...going to be simple, unfortunately.
Here's the original example again:
---
name: fred
tracksRegLiveness: true
body: |
   bb.0:
     successors: %bb.1, %bb.2
       J2_jumpt undef %p0, %bb.2, implicit-def %pc
       J2_jump %bb.1, implicit-def %pc
   bb.1:
     successors: %bb.3
       %r0 = L2_loadruh_io undef %r0, 0
       PS_storerhabs 0, killed %r0
       J2_jump %bb.3, implicit-def %pc
   bb.2:
     successors: %bb.3
       PS_storerhabs 0, undef %r0
       J2_jump %bb.3, implicit-def %pc
   bb.3:
       PS_jmpret killed %r31, implicit-def %pc
...
If the merging process produced this interm...
2017 Jul 27
2
Tail merging "undef" with a defined register: wrong code
...ver doing so can actually generate wrong code:
Consider this (valid code):
---
name: fred
tracksRegLiveness: true
body: |
   bb.0:
     successors: %bb.1, %bb.2
       J2_jumpt undef %p0, %bb.2, implicit-def %pc
       J2_jump %bb.1, implicit-def %pc
   bb.1:
     successors: %bb.3
       %r0 = L2_loadruh_io undef %r0, 0
       PS_storerhabs 0, killed %r0
       J2_jump %bb.3, implicit-def %pc
   bb.2:
     successors: %bb.3
       PS_storerhabs 0, undef %r0
       J2_jump %bb.3, implicit-def %pc
   bb.3:
       PS_jmpret killed %r31, implicit-def %pc
...
Run:
llc -march=hexagon -run-pass branch-fo...
2017 Jul 28
2
Tail merging "undef" with a defined register: wrong code
...d
>> tracksRegLiveness: true
>>
>> body: |
>>   bb.0:
>>     successors: %bb.1, %bb.2
>>       J2_jumpt undef %p0, %bb.2, implicit-def %pc
>>       J2_jump %bb.1, implicit-def %pc
>>
>>   bb.1:
>>     successors: %bb.3
>>       %r0 = L2_loadruh_io undef %r0, 0
>>       PS_storerhabs 0, killed %r0
>>       J2_jump %bb.3, implicit-def %pc
>>
>>   bb.2:
>>     successors: %bb.3
>>       PS_storerhabs 0, undef %r0
>>       J2_jump %bb.3, implicit-def %pc
>>
>>   bb.3:
>>       PS_jmpret...
2017 Jul 27
2
Tail merging "undef" with a defined register: wrong code
...d
>> tracksRegLiveness: true
>>
>> body: |
>>   bb.0:
>>     successors: %bb.1, %bb.2
>>       J2_jumpt undef %p0, %bb.2, implicit-def %pc
>>       J2_jump %bb.1, implicit-def %pc
>>
>>   bb.1:
>>     successors: %bb.3
>>       %r0 = L2_loadruh_io undef %r0, 0
>>       PS_storerhabs 0, killed %r0
>>       J2_jump %bb.3, implicit-def %pc
>>
>>   bb.2:
>>     successors: %bb.3
>>       PS_storerhabs 0, undef %r0
>>       J2_jump %bb.3, implicit-def %pc
>>
>>   bb.3:
>>       PS_jmpret...