Skip to content

Commit

Permalink
Mips: Make test resistant to future changes
Browse files Browse the repository at this point in the history
This seems to have been relying on extra spills being inserted in
these blocks to increase the code size to trigger branch
relaxation. This broke when these spills were avoided. Add some asm to
pad the size of the blocks to make it not matter.
  • Loading branch information
arsenm committed Dec 21, 2019
1 parent 42a2644 commit f9677c4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions llvm/test/CodeGen/Mips/branch-relaxation-with-hazard.ll
Expand Up @@ -38,11 +38,13 @@ entry:
br i1 %cmp, label %if.then, label %if.end4

if.then:
call void asm sideeffect ".space 10", "~{$1}"()
%1 = load i32, i32* %argc.addr, align 4
%cmp1 = icmp sgt i32 %1, 3
br i1 %cmp1, label %if.then2, label %if.end

if.then2:
call void asm sideeffect ".space 10", "~{$1}"()
%call = call i32 bitcast (i32 (...)* @boo to i32 ()*)()
store i32 %call, i32* %retval, align 4
br label %return
Expand Down

0 comments on commit f9677c4

Please sign in to comment.