Commit bd4ea5b4 by Jan Voung

Subzero: Adjust expectations now that llvm-mc aligns calls not just naclcall.

Previously, llvm would emit naclcall instead of call to get the effect of bundle-align-to-end, but now it just emits plain calls and aligns plain calls like NaCl binutils would do. Adjust a few Subzero tests. See: https://codereview.chromium.org/647443005/ Currently leaving the nop checks loose in case the integrated assembler has some intermediate stage where it emits the bytes of a call in a "raw" manner (without padding). BUG=none R=kschimpf@google.com Review URL: https://codereview.chromium.org/671193003
parent 088b2be2
...@@ -102,7 +102,9 @@ entry: ...@@ -102,7 +102,9 @@ entry:
; Bundle padding might be added (so not using -NEXT). ; Bundle padding might be added (so not using -NEXT).
; CHECK: mov dword ptr [esp + 16], 3735928559 ; CHECK: mov dword ptr [esp + 16], 3735928559
; CHECK-NEXT: mov dword ptr [esp + 12], 305419896 ; CHECK-NEXT: mov dword ptr [esp + 12], 305419896
; CHECK-NEXT: call -4 ; Bundle padding will push the call down.
; CHECK-NOT: mov
; CHECK: call -4
; CALLTARGETS: call ignore64BitArgNoInline ; CALLTARGETS: call ignore64BitArgNoInline
; ;
; OPTM1-LABEL: pass64BitConstArg ; OPTM1-LABEL: pass64BitConstArg
...@@ -113,7 +115,8 @@ entry: ...@@ -113,7 +115,8 @@ entry:
; Bundle padding might be added (so not using -NEXT). ; Bundle padding might be added (so not using -NEXT).
; OPTM1: mov dword ptr [esp + 16], 3735928559 ; OPTM1: mov dword ptr [esp + 16], 3735928559
; OPTM1-NEXT: mov dword ptr [esp + 12], 305419896 ; OPTM1-NEXT: mov dword ptr [esp + 12], 305419896
; OPTM1-NEXT: call -4 ; OPTM1-NOT: mov
; OPTM1: call -4
define internal i64 @return64BitArg(i64 %a) { define internal i64 @return64BitArg(i64 %a) {
entry: entry:
......
...@@ -25,12 +25,15 @@ next: ...@@ -25,12 +25,15 @@ next:
} }
; O2-LABEL: testUncondToNextBlock ; O2-LABEL: testUncondToNextBlock
; O2: call ; O2: call
; O2-NEXT: call ; There will be nops for bundle align to end (for NaCl), but there should
; not be a branch.
; O2-NOT: j
; O2: call
; OM1-LABEL: testUncondToNextBlock ; OM1-LABEL: testUncondToNextBlock
; OM1: call ; OM1: call
; OM1-NEXT: jmp ; OM1-NEXT: jmp
; OM1-NEXT: call ; OM1: call
; For a conditional branch with a fallthrough to the next block, the ; For a conditional branch with a fallthrough to the next block, the
; fallthrough branch should be removed. ; fallthrough branch should be removed.
...@@ -48,7 +51,8 @@ target: ...@@ -48,7 +51,8 @@ target:
; O2-LABEL: testCondFallthroughToNextBlock ; O2-LABEL: testCondFallthroughToNextBlock
; O2: cmp {{.*}}, 123 ; O2: cmp {{.*}}, 123
; O2-NEXT: jge ; O2-NEXT: jge
; O2-NEXT: call ; O2-NOT: j
; O2: call
; O2: ret ; O2: ret
; O2: call ; O2: call
; O2: ret ; O2: ret
...@@ -82,7 +86,8 @@ target: ...@@ -82,7 +86,8 @@ target:
; O2-LABEL: testCondTargetNextBlock ; O2-LABEL: testCondTargetNextBlock
; O2: cmp {{.*}}, 123 ; O2: cmp {{.*}}, 123
; O2-NEXT: jl ; O2-NEXT: jl
; O2-NEXT: call ; O2-NOT: j
; O2: call
; O2: ret ; O2: ret
; O2: call ; O2: call
; O2: ret ; O2: ret
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment