FEntryInserter prepends FENTRY_CALL to the first basic block. In case
there are other instructions, PostRA Machine Instruction Scheduler can
move FENTRY_CALL call around. This actually occurs on SystemZ (see the
testcase). This is bad for the following reasons:
- FENTRY_CALL clobbers registers.
- Linux Kernel depends on whatever FENTRY_CALL expands to to be the very first instruction in the function.
Fix by adding isCall attribute to FENTRY_CALL, which prevents reordering
by making it a scheduling boundary for PostRA Machine Instruction
Scheduler.
Maybe comment on what the purpose of this test is?
Why test for the brasl instruction - just to see that it compiles? I am not sure FileCheck is needed if that's the case...