[llvm] 3dcbbdd - Revert "Improve and enable folding of conditional branches with tail calls."
Mikhail Goncharov via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 1 07:10:19 PST 2023
Author: Mikhail Goncharov
Date: 2023-02-01T16:09:35+01:00
New Revision: 3dcbbddf169354078497724eabd9e6a0b82596c2
URL: https://github.com/llvm/llvm-project/commit/3dcbbddf169354078497724eabd9e6a0b82596c2
DIFF: https://github.com/llvm/llvm-project/commit/3dcbbddf169354078497724eabd9e6a0b82596c2.diff
LOG: Revert "Improve and enable folding of conditional branches with tail calls."
This reverts commit c05ddc9cbc12b1f2038380f57a16c4ca98c614b7.
Fails under asan:
https://lab.llvm.org/buildbot/#/builders/168/builds/11637
Failed Tests (3):
LLVM :: CodeGen/X86/jump_sign.ll
LLVM :: CodeGen/X86/or-branch.ll
LLVM :: CodeGen/X86/tailcall-extract.ll
Added:
Modified:
llvm/lib/CodeGen/BranchFolding.cpp
llvm/test/CodeGen/X86/add.ll
llvm/test/CodeGen/X86/atom-pad-short-functions.ll
llvm/test/CodeGen/X86/avx512-i1test.ll
llvm/test/CodeGen/X86/bmi.ll
llvm/test/CodeGen/X86/brcond.ll
llvm/test/CodeGen/X86/btq.ll
llvm/test/CodeGen/X86/cmp-merge.ll
llvm/test/CodeGen/X86/cmp.ll
llvm/test/CodeGen/X86/comi-flags.ll
llvm/test/CodeGen/X86/extern_weak.ll
llvm/test/CodeGen/X86/fold-rmw-ops.ll
llvm/test/CodeGen/X86/fp-strict-scalar-cmp-fp16.ll
llvm/test/CodeGen/X86/fp-strict-scalar-cmp.ll
llvm/test/CodeGen/X86/funnel-shift.ll
llvm/test/CodeGen/X86/jump_sign.ll
llvm/test/CodeGen/X86/neg_cmp.ll
llvm/test/CodeGen/X86/or-branch.ll
llvm/test/CodeGen/X86/peep-test-4.ll
llvm/test/CodeGen/X86/pr37025.ll
llvm/test/CodeGen/X86/pr37063.ll
llvm/test/CodeGen/X86/rd-mod-wr-eflags.ll
llvm/test/CodeGen/X86/segmented-stacks.ll
llvm/test/CodeGen/X86/sibcall.ll
llvm/test/CodeGen/X86/slow-incdec.ll
llvm/test/CodeGen/X86/sqrt-partial.ll
llvm/test/CodeGen/X86/switch-bt.ll
llvm/test/CodeGen/X86/tail-opts.ll
llvm/test/CodeGen/X86/tailcall-cgp-dup.ll
llvm/test/CodeGen/X86/tailcall-extract.ll
llvm/test/CodeGen/X86/xor-icmp.ll
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/BranchFolding.cpp b/llvm/lib/CodeGen/BranchFolding.cpp
index b87338d6ae423..d491691135dc0 100644
--- a/llvm/lib/CodeGen/BranchFolding.cpp
+++ b/llvm/lib/CodeGen/BranchFolding.cpp
@@ -1507,39 +1507,42 @@ bool BranchFolder::OptimizeBlock(MachineBasicBlock *MBB) {
}
}
- if (!IsEmptyBlock(MBB)) {
+ bool OptForSize =
+ MF.getFunction().hasOptSize() ||
+ llvm::shouldOptimizeForSize(MBB, PSI, &MBBFreqInfo);
+ if (!IsEmptyBlock(MBB) && MBB->pred_size() == 1 && OptForSize) {
+ // Changing "Jcc foo; foo: jmp bar;" into "Jcc bar;" might change the branch
+ // direction, thereby defeating careful block placement and regressing
+ // performance. Therefore, only consider this for optsize functions.
MachineInstr &TailCall = *MBB->getFirstNonDebugInstr();
if (TII->isUnconditionalTailCall(TailCall)) {
- for (auto &Pred : MBB->predecessors()) {
- MachineBasicBlock *PredTBB = nullptr, *PredFBB = nullptr;
- SmallVector<MachineOperand, 4> PredCond;
- bool PredAnalyzable =
- !TII->analyzeBranch(*Pred, PredTBB, PredFBB, PredCond, true);
-
- // Only eliminate if MBB == TBB (Taken Basic Block)
- if (PredAnalyzable && !PredCond.empty() && PredTBB == MBB &&
- PredTBB != PredFBB) {
- // The predecessor has a conditional branch to this block which
- // consists of only a tail call. Try to fold the tail call into the
- // conditional branch.
- if (TII->canMakeTailCallConditional(PredCond, TailCall)) {
- // TODO: It would be nice if analyzeBranch() could provide a pointer
- // to the branch instruction so replaceBranchWithTailCall() doesn't
- // have to search for it.
- TII->replaceBranchWithTailCall(*Pred, PredCond, TailCall);
- ++NumTailCalls;
- MadeChange = true;
- Pred->removeSuccessor(MBB);
- }
+ MachineBasicBlock *Pred = *MBB->pred_begin();
+ MachineBasicBlock *PredTBB = nullptr, *PredFBB = nullptr;
+ SmallVector<MachineOperand, 4> PredCond;
+ bool PredAnalyzable =
+ !TII->analyzeBranch(*Pred, PredTBB, PredFBB, PredCond, true);
+
+ if (PredAnalyzable && !PredCond.empty() && PredTBB == MBB &&
+ PredTBB != PredFBB) {
+ // The predecessor has a conditional branch to this block which consists
+ // of only a tail call. Try to fold the tail call into the conditional
+ // branch.
+ if (TII->canMakeTailCallConditional(PredCond, TailCall)) {
+ // TODO: It would be nice if analyzeBranch() could provide a pointer
+ // to the branch instruction so replaceBranchWithTailCall() doesn't
+ // have to search for it.
+ TII->replaceBranchWithTailCall(*Pred, PredCond, TailCall);
+ ++NumTailCalls;
+ Pred->removeSuccessor(MBB);
+ MadeChange = true;
+ return MadeChange;
}
- // If the predecessor is falling through to this block, we could reverse
- // the branch condition and fold the tail call into that. However, after
- // that we might have to re-arrange the CFG to fall through to the other
- // block and there is a high risk of regressing code size rather than
- // improving it.
}
- if (MadeChange)
- return MadeChange;
+ // If the predecessor is falling through to this block, we could reverse
+ // the branch condition and fold the tail call into that. However, after
+ // that we might have to re-arrange the CFG to fall through to the other
+ // block and there is a high risk of regressing code size rather than
+ // improving it.
}
}
diff --git a/llvm/test/CodeGen/X86/add.ll b/llvm/test/CodeGen/X86/add.ll
index 079294ef09bdb..0539d5dad6f3b 100644
--- a/llvm/test/CodeGen/X86/add.ll
+++ b/llvm/test/CodeGen/X86/add.ll
@@ -575,15 +575,19 @@ define void @add_i32_128_flag(i32 %x) {
; X64-LINUX-LABEL: add_i32_128_flag:
; X64-LINUX: # %bb.0: # %entry
; X64-LINUX-NEXT: subl $-128, %edi
-; X64-LINUX-NEXT: jne bar_i32 # TAILCALL
-; X64-LINUX-NEXT: # %bb.1: # %if.end
+; X64-LINUX-NEXT: je .LBB19_1
+; X64-LINUX-NEXT: # %bb.2: # %if.then
+; X64-LINUX-NEXT: jmp bar_i32 # TAILCALL
+; X64-LINUX-NEXT: .LBB19_1: # %if.end
; X64-LINUX-NEXT: retq
;
; X64-WIN32-LABEL: add_i32_128_flag:
; X64-WIN32: # %bb.0: # %entry
; X64-WIN32-NEXT: subl $-128, %ecx
-; X64-WIN32-NEXT: jne bar_i32 # TAILCALL
-; X64-WIN32-NEXT: # %bb.1: # %if.end
+; X64-WIN32-NEXT: je .LBB19_1
+; X64-WIN32-NEXT: # %bb.2: # %if.then
+; X64-WIN32-NEXT: jmp bar_i32 # TAILCALL
+; X64-WIN32-NEXT: .LBB19_1: # %if.end
; X64-WIN32-NEXT: retq
entry:
%add = add i32 %x, 128
@@ -623,15 +627,19 @@ define void @add_i64_128_flag(i64 %x) {
; X64-LINUX-LABEL: add_i64_128_flag:
; X64-LINUX: # %bb.0: # %entry
; X64-LINUX-NEXT: subq $-128, %rdi
-; X64-LINUX-NEXT: jne bar_i64 # TAILCALL
-; X64-LINUX-NEXT: # %bb.1: # %if.end
+; X64-LINUX-NEXT: je .LBB20_1
+; X64-LINUX-NEXT: # %bb.2: # %if.then
+; X64-LINUX-NEXT: jmp bar_i64 # TAILCALL
+; X64-LINUX-NEXT: .LBB20_1: # %if.end
; X64-LINUX-NEXT: retq
;
; X64-WIN32-LABEL: add_i64_128_flag:
; X64-WIN32: # %bb.0: # %entry
; X64-WIN32-NEXT: subq $-128, %rcx
-; X64-WIN32-NEXT: jne bar_i64 # TAILCALL
-; X64-WIN32-NEXT: # %bb.1: # %if.end
+; X64-WIN32-NEXT: je .LBB20_1
+; X64-WIN32-NEXT: # %bb.2: # %if.then
+; X64-WIN32-NEXT: jmp bar_i64 # TAILCALL
+; X64-WIN32-NEXT: .LBB20_1: # %if.end
; X64-WIN32-NEXT: retq
entry:
%add = add i64 %x, 128
@@ -671,15 +679,19 @@ define void @add_i64_2147483648_flag(i64 %x) {
; X64-LINUX-LABEL: add_i64_2147483648_flag:
; X64-LINUX: # %bb.0: # %entry
; X64-LINUX-NEXT: subq $-2147483648, %rdi # imm = 0x80000000
-; X64-LINUX-NEXT: jne bar_i64 # TAILCALL
-; X64-LINUX-NEXT: # %bb.1: # %if.end
+; X64-LINUX-NEXT: je .LBB21_1
+; X64-LINUX-NEXT: # %bb.2: # %if.then
+; X64-LINUX-NEXT: jmp bar_i64 # TAILCALL
+; X64-LINUX-NEXT: .LBB21_1: # %if.end
; X64-LINUX-NEXT: retq
;
; X64-WIN32-LABEL: add_i64_2147483648_flag:
; X64-WIN32: # %bb.0: # %entry
; X64-WIN32-NEXT: subq $-2147483648, %rcx # imm = 0x80000000
-; X64-WIN32-NEXT: jne bar_i64 # TAILCALL
-; X64-WIN32-NEXT: # %bb.1: # %if.end
+; X64-WIN32-NEXT: je .LBB21_1
+; X64-WIN32-NEXT: # %bb.2: # %if.then
+; X64-WIN32-NEXT: jmp bar_i64 # TAILCALL
+; X64-WIN32-NEXT: .LBB21_1: # %if.end
; X64-WIN32-NEXT: retq
entry:
%add = add i64 %x, 2147483648
diff --git a/llvm/test/CodeGen/X86/atom-pad-short-functions.ll b/llvm/test/CodeGen/X86/atom-pad-short-functions.ll
index 06800bd244de3..c107dfff28ca3 100644
--- a/llvm/test/CodeGen/X86/atom-pad-short-functions.ll
+++ b/llvm/test/CodeGen/X86/atom-pad-short-functions.ll
@@ -86,8 +86,10 @@ define void @test_call_others(i32 %x) nounwind {
; CHECK-LABEL: test_call_others:
; CHECK: # %bb.0:
; CHECK-NEXT: cmpl $0, {{[0-9]+}}(%esp)
-; CHECK-NEXT: jne external_function at PLT # TAILCALL
-; CHECK-NEXT: # %bb.1: # %if.end
+; CHECK-NEXT: je .LBB6_1
+; CHECK-NEXT: # %bb.2: # %true.case
+; CHECK-NEXT: jmp external_function at PLT # TAILCALL
+; CHECK-NEXT: .LBB6_1: # %if.end
; CHECK-NEXT: nop
; CHECK-NEXT: nop
; CHECK-NEXT: nop
diff --git a/llvm/test/CodeGen/X86/avx512-i1test.ll b/llvm/test/CodeGen/X86/avx512-i1test.ll
index 51983de9b0e75..f01472e9c83c3 100644
--- a/llvm/test/CodeGen/X86/avx512-i1test.ll
+++ b/llvm/test/CodeGen/X86/avx512-i1test.ll
@@ -66,8 +66,10 @@ define i64 @func2(i1 zeroext %i, i32 %j) {
; CHECK-LABEL: func2:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: testl %esi, %esi
-; CHECK-NEXT: jne bar # TAILCALL
-; CHECK-NEXT: # %bb.1: # %if.end
+; CHECK-NEXT: je .LBB1_1
+; CHECK-NEXT: # %bb.2: # %if.then
+; CHECK-NEXT: jmp bar # TAILCALL
+; CHECK-NEXT: .LBB1_1: # %if.end
; CHECK-NEXT: movzbl %dil, %eax
; CHECK-NEXT: orq $-2, %rax
; CHECK-NEXT: retq
diff --git a/llvm/test/CodeGen/X86/bmi.ll b/llvm/test/CodeGen/X86/bmi.ll
index e4e33c99a6b88..15c8ad471ea7f 100644
--- a/llvm/test/CodeGen/X86/bmi.ll
+++ b/llvm/test/CodeGen/X86/bmi.ll
@@ -1223,16 +1223,20 @@ define void @pr40060(i32, i32) {
; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
; X86-NEXT: bextrl %eax, {{[0-9]+}}(%esp), %eax
; X86-NEXT: testl %eax, %eax
-; X86-NEXT: jns bar # TAILCALL
-; X86-NEXT: # %bb.1:
+; X86-NEXT: js .LBB52_1
+; X86-NEXT: # %bb.2:
+; X86-NEXT: jmp bar # TAILCALL
+; X86-NEXT: .LBB52_1:
; X86-NEXT: retl
;
; X64-LABEL: pr40060:
; X64: # %bb.0:
; X64-NEXT: bextrl %esi, %edi, %eax
; X64-NEXT: testl %eax, %eax
-; X64-NEXT: jns bar # TAILCALL
-; X64-NEXT: # %bb.1:
+; X64-NEXT: js .LBB52_1
+; X64-NEXT: # %bb.2:
+; X64-NEXT: jmp bar # TAILCALL
+; X64-NEXT: .LBB52_1:
; X64-NEXT: retq
%3 = tail call i32 @llvm.x86.bmi.bextr.32(i32 %0, i32 %1)
%4 = icmp sgt i32 %3, -1
@@ -1440,15 +1444,19 @@ define void @pr42118_i32(i32 %x) {
; X86-LABEL: pr42118_i32:
; X86: # %bb.0:
; X86-NEXT: blsrl {{[0-9]+}}(%esp), %eax
-; X86-NEXT: je bar # TAILCALL
-; X86-NEXT: # %bb.1:
+; X86-NEXT: jne .LBB57_1
+; X86-NEXT: # %bb.2:
+; X86-NEXT: jmp bar # TAILCALL
+; X86-NEXT: .LBB57_1:
; X86-NEXT: retl
;
; X64-LABEL: pr42118_i32:
; X64: # %bb.0:
; X64-NEXT: blsrl %edi, %eax
-; X64-NEXT: je bar # TAILCALL
-; X64-NEXT: # %bb.1:
+; X64-NEXT: jne .LBB57_1
+; X64-NEXT: # %bb.2:
+; X64-NEXT: jmp bar # TAILCALL
+; X64-NEXT: .LBB57_1:
; X64-NEXT: retq
%tmp = sub i32 0, %x
%tmp1 = and i32 %tmp, %x
@@ -1490,8 +1498,10 @@ define void @pr42118_i64(i64 %x) {
; X64-LABEL: pr42118_i64:
; X64: # %bb.0:
; X64-NEXT: blsrq %rdi, %rax
-; X64-NEXT: je bar # TAILCALL
-; X64-NEXT: # %bb.1:
+; X64-NEXT: jne .LBB58_1
+; X64-NEXT: # %bb.2:
+; X64-NEXT: jmp bar # TAILCALL
+; X64-NEXT: .LBB58_1:
; X64-NEXT: retq
%tmp = sub i64 0, %x
%tmp1 = and i64 %tmp, %x
diff --git a/llvm/test/CodeGen/X86/brcond.ll b/llvm/test/CodeGen/X86/brcond.ll
index 02daaa23569b2..c933b69730806 100644
--- a/llvm/test/CodeGen/X86/brcond.ll
+++ b/llvm/test/CodeGen/X86/brcond.ll
@@ -9,8 +9,10 @@ define i32 @test1(i32 %a, i32 %b) nounwind ssp {
; CHECK-NEXT: movzbl {{[0-9]+}}(%esp), %eax
; CHECK-NEXT: xorb {{[0-9]+}}(%esp), %al
; CHECK-NEXT: testb $64, %al
-; CHECK-NEXT: jne _bar ## TAILCALL
-; CHECK-NEXT: ## %bb.1: ## %bb
+; CHECK-NEXT: je LBB0_1
+; CHECK-NEXT: ## %bb.2: ## %bb1
+; CHECK-NEXT: jmp _bar ## TAILCALL
+; CHECK-NEXT: LBB0_1: ## %bb
; CHECK-NEXT: jmp _foo ## TAILCALL
entry:
%0 = and i32 %a, 16384
diff --git a/llvm/test/CodeGen/X86/btq.ll b/llvm/test/CodeGen/X86/btq.ll
index f11b170dba552..204090108e8e6 100644
--- a/llvm/test/CodeGen/X86/btq.ll
+++ b/llvm/test/CodeGen/X86/btq.ll
@@ -7,9 +7,11 @@ define void @test1(i64 %foo) nounwind {
; CHECK-LABEL: test1:
; CHECK: # %bb.0:
; CHECK-NEXT: btq $32, %rdi
-; CHECK-NEXT: jb bar # TAILCALL
+; CHECK-NEXT: jb .LBB0_2
; CHECK-NEXT: # %bb.1: # %if.end
; CHECK-NEXT: retq
+; CHECK-NEXT: .LBB0_2: # %if.then
+; CHECK-NEXT: jmp bar # TAILCALL
%and = and i64 %foo, 4294967296
%tobool = icmp eq i64 %and, 0
br i1 %tobool, label %if.end, label %if.then
@@ -26,9 +28,11 @@ define void @test2(i64 %foo) nounwind {
; CHECK-LABEL: test2:
; CHECK: # %bb.0:
; CHECK-NEXT: testl %edi, %edi
-; CHECK-NEXT: js bar # TAILCALL
+; CHECK-NEXT: js .LBB1_2
; CHECK-NEXT: # %bb.1: # %if.end
; CHECK-NEXT: retq
+; CHECK-NEXT: .LBB1_2: # %if.then
+; CHECK-NEXT: jmp bar # TAILCALL
%and = and i64 %foo, 2147483648
%tobool = icmp eq i64 %and, 0
br i1 %tobool, label %if.end, label %if.then
diff --git a/llvm/test/CodeGen/X86/cmp-merge.ll b/llvm/test/CodeGen/X86/cmp-merge.ll
index bc0da24ff5d6e..2a503bf902765 100644
--- a/llvm/test/CodeGen/X86/cmp-merge.ll
+++ b/llvm/test/CodeGen/X86/cmp-merge.ll
@@ -15,19 +15,27 @@ define void @eq_first(i32 %0, i32 %1) {
; X86: # %bb.0:
; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
; X86-NEXT: cmpl %eax, {{[0-9]+}}(%esp)
-; X86-NEXT: jl on_less at PLT # TAILCALL
-; X86-NEXT: # %bb.1:
-; X86-NEXT: je on_equal at PLT # TAILCALL
-; X86-NEXT: # %bb.2:
+; X86-NEXT: jge .LBB0_1
+; X86-NEXT: # %bb.3:
+; X86-NEXT: jmp on_less at PLT # TAILCALL
+; X86-NEXT: .LBB0_1:
+; X86-NEXT: jne .LBB0_2
+; X86-NEXT: # %bb.4:
+; X86-NEXT: jmp on_equal at PLT # TAILCALL
+; X86-NEXT: .LBB0_2:
; X86-NEXT: jmp on_greater at PLT # TAILCALL
;
; X64-LABEL: eq_first:
; X64: # %bb.0:
; X64-NEXT: cmpl %esi, %edi
-; X64-NEXT: jl on_less at PLT # TAILCALL
-; X64-NEXT: # %bb.1:
-; X64-NEXT: je on_equal at PLT # TAILCALL
-; X64-NEXT: # %bb.2:
+; X64-NEXT: jge .LBB0_1
+; X64-NEXT: # %bb.3:
+; X64-NEXT: jmp on_less at PLT # TAILCALL
+; X64-NEXT: .LBB0_1:
+; X64-NEXT: jne .LBB0_2
+; X64-NEXT: # %bb.4:
+; X64-NEXT: jmp on_equal at PLT # TAILCALL
+; X64-NEXT: .LBB0_2:
; X64-NEXT: jmp on_greater at PLT # TAILCALL
%3 = icmp slt i32 %0, %1
br i1 %3, label %4, label %5
@@ -53,19 +61,27 @@ define void @gt_first(i32 %0, i32 %1) {
; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
; X86-NEXT: cmpl %eax, %ecx
-; X86-NEXT: jl on_less at PLT # TAILCALL
-; X86-NEXT: # %bb.1:
-; X86-NEXT: jg on_greater at PLT # TAILCALL
-; X86-NEXT: # %bb.2:
+; X86-NEXT: jge .LBB1_1
+; X86-NEXT: # %bb.3:
+; X86-NEXT: jmp on_less at PLT # TAILCALL
+; X86-NEXT: .LBB1_1:
+; X86-NEXT: jle .LBB1_2
+; X86-NEXT: # %bb.4:
+; X86-NEXT: jmp on_greater at PLT # TAILCALL
+; X86-NEXT: .LBB1_2:
; X86-NEXT: jmp on_equal at PLT # TAILCALL
;
; X64-LABEL: gt_first:
; X64: # %bb.0:
; X64-NEXT: cmpl %esi, %edi
-; X64-NEXT: jl on_less at PLT # TAILCALL
-; X64-NEXT: # %bb.1:
-; X64-NEXT: jg on_greater at PLT # TAILCALL
-; X64-NEXT: # %bb.2:
+; X64-NEXT: jge .LBB1_1
+; X64-NEXT: # %bb.3:
+; X64-NEXT: jmp on_less at PLT # TAILCALL
+; X64-NEXT: .LBB1_1:
+; X64-NEXT: jle .LBB1_2
+; X64-NEXT: # %bb.4:
+; X64-NEXT: jmp on_greater at PLT # TAILCALL
+; X64-NEXT: .LBB1_2:
; X64-NEXT: jmp on_equal at PLT # TAILCALL
%3 = icmp slt i32 %0, %1
br i1 %3, label %4, label %5
diff --git a/llvm/test/CodeGen/X86/cmp.ll b/llvm/test/CodeGen/X86/cmp.ll
index e6ab3ec55ad92..2b27d24f0f739 100644
--- a/llvm/test/CodeGen/X86/cmp.ll
+++ b/llvm/test/CodeGen/X86/cmp.ll
@@ -729,13 +729,16 @@ define i32 @pr42189(i16 signext %c) {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: cmpl $32767, %edi # encoding: [0x81,0xff,0xff,0x7f,0x00,0x00]
; CHECK-NEXT: # imm = 0x7FFF
-; CHECK-NEXT: jne f at PLT # TAILCALL
-; CHECK-NEXT: # encoding: [0x75,A]
-; CHECK-NEXT: # fixup A - offset: 1, value: f at PLT-1, kind: FK_PCRel_1
+; CHECK-NEXT: jne .LBB45_2 # encoding: [0x75,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB45_2-1, kind: FK_PCRel_1
; CHECK-NEXT: # %bb.1: # %if.then
; CHECK-NEXT: jmp g at PLT # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: g at PLT-1, kind: FK_PCRel_1
+; CHECK-NEXT: .LBB45_2: # %if.end
+; CHECK-NEXT: jmp f at PLT # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: f at PLT-1, kind: FK_PCRel_1
entry:
%cmp = icmp eq i16 %c, 32767
br i1 %cmp, label %if.then, label %if.end
diff --git a/llvm/test/CodeGen/X86/comi-flags.ll b/llvm/test/CodeGen/X86/comi-flags.ll
index 8b7a089f0ce87..097d3943eaf5e 100644
--- a/llvm/test/CodeGen/X86/comi-flags.ll
+++ b/llvm/test/CodeGen/X86/comi-flags.ll
@@ -553,8 +553,10 @@ define void @PR38960_eq(<4 x float> %A, <4 x float> %B) {
; SSE-NEXT: setnp %al
; SSE-NEXT: sete %cl
; SSE-NEXT: testb %al, %cl
-; SSE-NEXT: jne foo at PLT # TAILCALL
-; SSE-NEXT: # %bb.1: # %if.end
+; SSE-NEXT: je .LBB24_1
+; SSE-NEXT: # %bb.2: # %if.then
+; SSE-NEXT: jmp foo at PLT # TAILCALL
+; SSE-NEXT: .LBB24_1: # %if.end
; SSE-NEXT: retq
;
; AVX-LABEL: PR38960_eq:
@@ -563,8 +565,10 @@ define void @PR38960_eq(<4 x float> %A, <4 x float> %B) {
; AVX-NEXT: setnp %al
; AVX-NEXT: sete %cl
; AVX-NEXT: testb %al, %cl
-; AVX-NEXT: jne foo at PLT # TAILCALL
-; AVX-NEXT: # %bb.1: # %if.end
+; AVX-NEXT: je .LBB24_1
+; AVX-NEXT: # %bb.2: # %if.then
+; AVX-NEXT: jmp foo at PLT # TAILCALL
+; AVX-NEXT: .LBB24_1: # %if.end
; AVX-NEXT: retq
entry:
%call = tail call i32 @llvm.x86.sse.comieq.ss(<4 x float> %A, <4 x float> %B) #3
@@ -586,8 +590,10 @@ define void @PR38960_neq(<4 x float> %A, <4 x float> %B) {
; SSE-NEXT: setp %al
; SSE-NEXT: setne %cl
; SSE-NEXT: orb %al, %cl
-; SSE-NEXT: jne foo at PLT # TAILCALL
-; SSE-NEXT: # %bb.1: # %if.end
+; SSE-NEXT: je .LBB25_1
+; SSE-NEXT: # %bb.2: # %if.then
+; SSE-NEXT: jmp foo at PLT # TAILCALL
+; SSE-NEXT: .LBB25_1: # %if.end
; SSE-NEXT: retq
;
; AVX-LABEL: PR38960_neq:
@@ -596,8 +602,10 @@ define void @PR38960_neq(<4 x float> %A, <4 x float> %B) {
; AVX-NEXT: setp %al
; AVX-NEXT: setne %cl
; AVX-NEXT: orb %al, %cl
-; AVX-NEXT: jne foo at PLT # TAILCALL
-; AVX-NEXT: # %bb.1: # %if.end
+; AVX-NEXT: je .LBB25_1
+; AVX-NEXT: # %bb.2: # %if.then
+; AVX-NEXT: jmp foo at PLT # TAILCALL
+; AVX-NEXT: .LBB25_1: # %if.end
; AVX-NEXT: retq
entry:
%call = tail call i32 @llvm.x86.sse.comineq.ss(<4 x float> %A, <4 x float> %B) #3
diff --git a/llvm/test/CodeGen/X86/extern_weak.ll b/llvm/test/CodeGen/X86/extern_weak.ll
index df27521867526..b79d630f6e303 100644
--- a/llvm/test/CodeGen/X86/extern_weak.ll
+++ b/llvm/test/CodeGen/X86/extern_weak.ll
@@ -18,7 +18,7 @@ if.end:
; DARWIN-LABEL: _bar:
; DARWIN: cmpl $0, L_foo$non_lazy_ptr
-; DARWIN: jne _foo ## TAILCALL
+; DARWIN: jmp _foo ## TAILCALL
; WIN32-LABEL: _bar:
; WIN32: cmpl $0, .refptr._foo
diff --git a/llvm/test/CodeGen/X86/fold-rmw-ops.ll b/llvm/test/CodeGen/X86/fold-rmw-ops.ll
index 22cec09c90599..fcbe460a40db5 100644
--- a/llvm/test/CodeGen/X86/fold-rmw-ops.ll
+++ b/llvm/test/CodeGen/X86/fold-rmw-ops.ll
@@ -17,10 +17,13 @@ define void @add64_imm32_br() nounwind {
; CHECK-NEXT: addq $16777214, g64(%rip) # encoding: [0x48,0x81,0x05,A,A,A,A,0xfe,0xff,0xff,0x00]
; CHECK-NEXT: # fixup A - offset: 3, value: g64-8, kind: reloc_riprel_4byte
; CHECK-NEXT: # imm = 0xFFFFFE
-; CHECK-NEXT: jns b # TAILCALL
-; CHECK-NEXT: # encoding: [0x79,A]
+; CHECK-NEXT: js .LBB0_1 # encoding: [0x78,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB0_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB0_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -47,10 +50,13 @@ define void @add64_sext_imm32_br() nounwind {
; CHECK-NEXT: addq $-2147483648, g64(%rip) # encoding: [0x48,0x81,0x05,A,A,A,A,0x00,0x00,0x00,0x80]
; CHECK-NEXT: # fixup A - offset: 3, value: g64-8, kind: reloc_riprel_4byte
; CHECK-NEXT: # imm = 0x80000000
-; CHECK-NEXT: jns b # TAILCALL
-; CHECK-NEXT: # encoding: [0x79,A]
+; CHECK-NEXT: js .LBB1_1 # encoding: [0x78,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB1_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB1_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -77,10 +83,13 @@ define void @add64_imm32_via_sub_br() nounwind {
; CHECK-NEXT: subq $-2147483648, g64(%rip) # encoding: [0x48,0x81,0x2d,A,A,A,A,0x00,0x00,0x00,0x80]
; CHECK-NEXT: # fixup A - offset: 3, value: g64-8, kind: reloc_riprel_4byte
; CHECK-NEXT: # imm = 0x80000000
-; CHECK-NEXT: jns b # TAILCALL
-; CHECK-NEXT: # encoding: [0x79,A]
+; CHECK-NEXT: js .LBB2_1 # encoding: [0x78,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB2_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB2_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -109,13 +118,16 @@ define void @add64_no_imm32_via_sub_due_to_cf_br() nounwind {
; CHECK-NEXT: # imm = 0x80000000
; CHECK-NEXT: addq %rax, g64(%rip) # encoding: [0x48,0x01,0x05,A,A,A,A]
; CHECK-NEXT: # fixup A - offset: 3, value: g64-4, kind: reloc_riprel_4byte
-; CHECK-NEXT: jae b # TAILCALL
-; CHECK-NEXT: # encoding: [0x73,A]
-; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
+; CHECK-NEXT: jae .LBB3_2 # encoding: [0x73,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB3_2-1, kind: FK_PCRel_1
; CHECK-NEXT: # %bb.1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
+; CHECK-NEXT: .LBB3_2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
entry:
%load1 = load i64, ptr @g64
; Add 0x80000000, which cannot fit in a sign extended 32-bit immediate, but
@@ -142,10 +154,13 @@ define void @add64_too_large_imm32_br() nounwind {
; CHECK-NEXT: # imm = 0x80000001
; CHECK-NEXT: addq %rax, g64(%rip) # encoding: [0x48,0x01,0x05,A,A,A,A]
; CHECK-NEXT: # fixup A - offset: 3, value: g64-4, kind: reloc_riprel_4byte
-; CHECK-NEXT: jns b # TAILCALL
-; CHECK-NEXT: # encoding: [0x79,A]
+; CHECK-NEXT: js .LBB4_1 # encoding: [0x78,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB4_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB4_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -172,10 +187,13 @@ define void @add64_imm8_via_sub_br() nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: subq $-128, g64(%rip) # encoding: [0x48,0x83,0x2d,A,A,A,A,0x80]
; CHECK-NEXT: # fixup A - offset: 3, value: g64-5, kind: reloc_riprel_4byte
-; CHECK-NEXT: jns b # TAILCALL
-; CHECK-NEXT: # encoding: [0x79,A]
+; CHECK-NEXT: js .LBB5_1 # encoding: [0x78,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB5_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB5_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -202,10 +220,13 @@ define void @add64_imm8_br() nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: addq $42, g64(%rip) # encoding: [0x48,0x83,0x05,A,A,A,A,0x2a]
; CHECK-NEXT: # fixup A - offset: 3, value: g64-5, kind: reloc_riprel_4byte
-; CHECK-NEXT: jns b # TAILCALL
-; CHECK-NEXT: # encoding: [0x79,A]
+; CHECK-NEXT: js .LBB6_1 # encoding: [0x78,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB6_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB6_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -230,10 +251,13 @@ define void @add64_imm8_neg_br() nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: addq $-42, g64(%rip) # encoding: [0x48,0x83,0x05,A,A,A,A,0xd6]
; CHECK-NEXT: # fixup A - offset: 3, value: g64-5, kind: reloc_riprel_4byte
-; CHECK-NEXT: jns b # TAILCALL
-; CHECK-NEXT: # encoding: [0x79,A]
+; CHECK-NEXT: js .LBB7_1 # encoding: [0x78,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB7_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB7_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -259,10 +283,13 @@ define void @add32_imm_br() nounwind {
; CHECK-NEXT: addl $-2147483648, g32(%rip) # encoding: [0x81,0x05,A,A,A,A,0x00,0x00,0x00,0x80]
; CHECK-NEXT: # fixup A - offset: 2, value: g32-8, kind: reloc_riprel_4byte
; CHECK-NEXT: # imm = 0x80000000
-; CHECK-NEXT: jns b # TAILCALL
-; CHECK-NEXT: # encoding: [0x79,A]
+; CHECK-NEXT: js .LBB8_1 # encoding: [0x78,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB8_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB8_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -288,10 +315,13 @@ define void @add32_imm8_br() nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: addl $42, g32(%rip) # encoding: [0x83,0x05,A,A,A,A,0x2a]
; CHECK-NEXT: # fixup A - offset: 2, value: g32-5, kind: reloc_riprel_4byte
-; CHECK-NEXT: jns b # TAILCALL
-; CHECK-NEXT: # encoding: [0x79,A]
+; CHECK-NEXT: js .LBB9_1 # encoding: [0x78,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB9_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB9_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -316,10 +346,13 @@ define void @add32_imm8_neg_br() nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: addl $-42, g32(%rip) # encoding: [0x83,0x05,A,A,A,A,0xd6]
; CHECK-NEXT: # fixup A - offset: 2, value: g32-5, kind: reloc_riprel_4byte
-; CHECK-NEXT: jns b # TAILCALL
-; CHECK-NEXT: # encoding: [0x79,A]
+; CHECK-NEXT: js .LBB10_1 # encoding: [0x78,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB10_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB10_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -345,10 +378,13 @@ define void @add16_imm_br() nounwind {
; CHECK-NEXT: addw $-32768, g16(%rip) # encoding: [0x66,0x81,0x05,A,A,A,A,0x00,0x80]
; CHECK-NEXT: # fixup A - offset: 3, value: g16-6, kind: reloc_riprel_4byte
; CHECK-NEXT: # imm = 0x8000
-; CHECK-NEXT: jns b # TAILCALL
-; CHECK-NEXT: # encoding: [0x79,A]
+; CHECK-NEXT: js .LBB11_1 # encoding: [0x78,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB11_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB11_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -374,10 +410,13 @@ define void @add16_imm8_br() nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: addw $42, g16(%rip) # encoding: [0x66,0x83,0x05,A,A,A,A,0x2a]
; CHECK-NEXT: # fixup A - offset: 3, value: g16-5, kind: reloc_riprel_4byte
-; CHECK-NEXT: jns b # TAILCALL
-; CHECK-NEXT: # encoding: [0x79,A]
+; CHECK-NEXT: js .LBB12_1 # encoding: [0x78,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB12_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB12_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -402,10 +441,13 @@ define void @add16_imm8_neg_br() nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: addw $-42, g16(%rip) # encoding: [0x66,0x83,0x05,A,A,A,A,0xd6]
; CHECK-NEXT: # fixup A - offset: 3, value: g16-5, kind: reloc_riprel_4byte
-; CHECK-NEXT: jns b # TAILCALL
-; CHECK-NEXT: # encoding: [0x79,A]
+; CHECK-NEXT: js .LBB13_1 # encoding: [0x78,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB13_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB13_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -430,10 +472,13 @@ define void @add8_imm_br() nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: addb $-2, g8(%rip) # encoding: [0x80,0x05,A,A,A,A,0xfe]
; CHECK-NEXT: # fixup A - offset: 2, value: g8-5, kind: reloc_riprel_4byte
-; CHECK-NEXT: jns b # TAILCALL
-; CHECK-NEXT: # encoding: [0x79,A]
+; CHECK-NEXT: js .LBB14_1 # encoding: [0x78,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB14_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB14_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -458,10 +503,13 @@ define void @add64_reg_br(i64 %arg) nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: addq %rdi, g64(%rip) # encoding: [0x48,0x01,0x3d,A,A,A,A]
; CHECK-NEXT: # fixup A - offset: 3, value: g64-4, kind: reloc_riprel_4byte
-; CHECK-NEXT: jns b # TAILCALL
-; CHECK-NEXT: # encoding: [0x79,A]
+; CHECK-NEXT: js .LBB15_1 # encoding: [0x78,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB15_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB15_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -486,10 +534,13 @@ define void @add32_reg_br(i32 %arg) nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: addl %edi, g32(%rip) # encoding: [0x01,0x3d,A,A,A,A]
; CHECK-NEXT: # fixup A - offset: 2, value: g32-4, kind: reloc_riprel_4byte
-; CHECK-NEXT: jns b # TAILCALL
-; CHECK-NEXT: # encoding: [0x79,A]
+; CHECK-NEXT: js .LBB16_1 # encoding: [0x78,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB16_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB16_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -514,10 +565,13 @@ define void @add16_reg_br(i16 %arg) nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: addw %di, g16(%rip) # encoding: [0x66,0x01,0x3d,A,A,A,A]
; CHECK-NEXT: # fixup A - offset: 3, value: g16-4, kind: reloc_riprel_4byte
-; CHECK-NEXT: jns b # TAILCALL
-; CHECK-NEXT: # encoding: [0x79,A]
+; CHECK-NEXT: js .LBB17_1 # encoding: [0x78,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB17_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB17_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -542,10 +596,13 @@ define void @add8_reg_br(i8 %arg) nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: addb %dil, g8(%rip) # encoding: [0x40,0x00,0x3d,A,A,A,A]
; CHECK-NEXT: # fixup A - offset: 3, value: g8-4, kind: reloc_riprel_4byte
-; CHECK-NEXT: jns b # TAILCALL
-; CHECK-NEXT: # encoding: [0x79,A]
+; CHECK-NEXT: js .LBB18_1 # encoding: [0x78,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB18_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB18_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -571,10 +628,13 @@ define void @sub64_imm32_br() nounwind {
; CHECK-NEXT: subq $-2147483648, g64(%rip) # encoding: [0x48,0x81,0x2d,A,A,A,A,0x00,0x00,0x00,0x80]
; CHECK-NEXT: # fixup A - offset: 3, value: g64-8, kind: reloc_riprel_4byte
; CHECK-NEXT: # imm = 0x80000000
-; CHECK-NEXT: jns b # TAILCALL
-; CHECK-NEXT: # encoding: [0x79,A]
+; CHECK-NEXT: js .LBB19_1 # encoding: [0x78,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB19_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB19_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -603,10 +663,13 @@ define void @sub64_too_large_imm32_br() nounwind {
; CHECK-NEXT: # imm = 0xFFFFFFFF00000001
; CHECK-NEXT: addq %rax, g64(%rip) # encoding: [0x48,0x01,0x05,A,A,A,A]
; CHECK-NEXT: # fixup A - offset: 3, value: g64-4, kind: reloc_riprel_4byte
-; CHECK-NEXT: jns b # TAILCALL
-; CHECK-NEXT: # encoding: [0x79,A]
+; CHECK-NEXT: js .LBB20_1 # encoding: [0x78,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB20_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB20_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -633,10 +696,13 @@ define void @sub64_imm8_br() nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: subq $-128, g64(%rip) # encoding: [0x48,0x83,0x2d,A,A,A,A,0x80]
; CHECK-NEXT: # fixup A - offset: 3, value: g64-5, kind: reloc_riprel_4byte
-; CHECK-NEXT: jns b # TAILCALL
-; CHECK-NEXT: # encoding: [0x79,A]
+; CHECK-NEXT: js .LBB21_1 # encoding: [0x78,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB21_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB21_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -664,10 +730,13 @@ define void @sub32_imm_br() nounwind {
; CHECK-NEXT: addl $-2147483648, g32(%rip) # encoding: [0x81,0x05,A,A,A,A,0x00,0x00,0x00,0x80]
; CHECK-NEXT: # fixup A - offset: 2, value: g32-8, kind: reloc_riprel_4byte
; CHECK-NEXT: # imm = 0x80000000
-; CHECK-NEXT: jns b # TAILCALL
-; CHECK-NEXT: # encoding: [0x79,A]
+; CHECK-NEXT: js .LBB22_1 # encoding: [0x78,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB22_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB22_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -694,10 +763,13 @@ define void @sub32_imm8_br() nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: subl $-128, g32(%rip) # encoding: [0x83,0x2d,A,A,A,A,0x80]
; CHECK-NEXT: # fixup A - offset: 2, value: g32-5, kind: reloc_riprel_4byte
-; CHECK-NEXT: jns b # TAILCALL
-; CHECK-NEXT: # encoding: [0x79,A]
+; CHECK-NEXT: js .LBB23_1 # encoding: [0x78,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB23_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB23_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -725,10 +797,13 @@ define void @sub16_imm_br() nounwind {
; CHECK-NEXT: addw $-32768, g16(%rip) # encoding: [0x66,0x81,0x05,A,A,A,A,0x00,0x80]
; CHECK-NEXT: # fixup A - offset: 3, value: g16-6, kind: reloc_riprel_4byte
; CHECK-NEXT: # imm = 0x8000
-; CHECK-NEXT: jns b # TAILCALL
-; CHECK-NEXT: # encoding: [0x79,A]
+; CHECK-NEXT: js .LBB24_1 # encoding: [0x78,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB24_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB24_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -755,10 +830,13 @@ define void @sub16_imm8_br() nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: subw $-128, g16(%rip) # encoding: [0x66,0x83,0x2d,A,A,A,A,0x80]
; CHECK-NEXT: # fixup A - offset: 3, value: g16-5, kind: reloc_riprel_4byte
-; CHECK-NEXT: jns b # TAILCALL
-; CHECK-NEXT: # encoding: [0x79,A]
+; CHECK-NEXT: js .LBB25_1 # encoding: [0x78,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB25_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB25_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -785,10 +863,13 @@ define void @sub8_imm_br() nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: addb $-128, g8(%rip) # encoding: [0x80,0x05,A,A,A,A,0x80]
; CHECK-NEXT: # fixup A - offset: 2, value: g8-5, kind: reloc_riprel_4byte
-; CHECK-NEXT: jns b # TAILCALL
-; CHECK-NEXT: # encoding: [0x79,A]
+; CHECK-NEXT: js .LBB26_1 # encoding: [0x78,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB26_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB26_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -815,10 +896,13 @@ define void @sub64_reg_br(i64 %arg) nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: subq %rdi, g64(%rip) # encoding: [0x48,0x29,0x3d,A,A,A,A]
; CHECK-NEXT: # fixup A - offset: 3, value: g64-4, kind: reloc_riprel_4byte
-; CHECK-NEXT: jns b # TAILCALL
-; CHECK-NEXT: # encoding: [0x79,A]
+; CHECK-NEXT: js .LBB27_1 # encoding: [0x78,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB27_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB27_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -843,10 +927,13 @@ define void @sub32_reg_br(i32 %arg) nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: subl %edi, g32(%rip) # encoding: [0x29,0x3d,A,A,A,A]
; CHECK-NEXT: # fixup A - offset: 2, value: g32-4, kind: reloc_riprel_4byte
-; CHECK-NEXT: jns b # TAILCALL
-; CHECK-NEXT: # encoding: [0x79,A]
+; CHECK-NEXT: js .LBB28_1 # encoding: [0x78,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB28_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB28_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -871,10 +958,13 @@ define void @sub16_reg_br(i16 %arg) nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: subw %di, g16(%rip) # encoding: [0x66,0x29,0x3d,A,A,A,A]
; CHECK-NEXT: # fixup A - offset: 3, value: g16-4, kind: reloc_riprel_4byte
-; CHECK-NEXT: jns b # TAILCALL
-; CHECK-NEXT: # encoding: [0x79,A]
+; CHECK-NEXT: js .LBB29_1 # encoding: [0x78,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB29_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB29_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -899,10 +989,13 @@ define void @sub8_reg_br(i8 %arg) nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: subb %dil, g8(%rip) # encoding: [0x40,0x28,0x3d,A,A,A,A]
; CHECK-NEXT: # fixup A - offset: 3, value: g8-4, kind: reloc_riprel_4byte
-; CHECK-NEXT: jns b # TAILCALL
-; CHECK-NEXT: # encoding: [0x79,A]
+; CHECK-NEXT: js .LBB30_1 # encoding: [0x78,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB30_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB30_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -928,10 +1021,13 @@ define void @and64_imm32_br() nounwind {
; CHECK-NEXT: andq $16777215, g64(%rip) # encoding: [0x48,0x81,0x25,A,A,A,A,0xff,0xff,0xff,0x00]
; CHECK-NEXT: # fixup A - offset: 3, value: g64-8, kind: reloc_riprel_4byte
; CHECK-NEXT: # imm = 0xFFFFFF
-; CHECK-NEXT: jne b # TAILCALL
-; CHECK-NEXT: # encoding: [0x75,A]
+; CHECK-NEXT: je .LBB31_1 # encoding: [0x74,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB31_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB31_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -958,10 +1054,13 @@ define void @and64_sext_imm32_br() nounwind {
; CHECK-NEXT: andq $-2147483648, g64(%rip) # encoding: [0x48,0x81,0x25,A,A,A,A,0x00,0x00,0x00,0x80]
; CHECK-NEXT: # fixup A - offset: 3, value: g64-8, kind: reloc_riprel_4byte
; CHECK-NEXT: # imm = 0x80000000
-; CHECK-NEXT: jne b # TAILCALL
-; CHECK-NEXT: # encoding: [0x75,A]
+; CHECK-NEXT: je .LBB32_1 # encoding: [0x74,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB32_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB32_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -987,10 +1086,13 @@ define void @and64_imm8_br() nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: andq $15, g64(%rip) # encoding: [0x48,0x83,0x25,A,A,A,A,0x0f]
; CHECK-NEXT: # fixup A - offset: 3, value: g64-5, kind: reloc_riprel_4byte
-; CHECK-NEXT: jne b # TAILCALL
-; CHECK-NEXT: # encoding: [0x75,A]
+; CHECK-NEXT: je .LBB33_1 # encoding: [0x74,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB33_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB33_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -1015,10 +1117,13 @@ define void @and64_imm8_neg_br() nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: andq $-4, g64(%rip) # encoding: [0x48,0x83,0x25,A,A,A,A,0xfc]
; CHECK-NEXT: # fixup A - offset: 3, value: g64-5, kind: reloc_riprel_4byte
-; CHECK-NEXT: jne b # TAILCALL
-; CHECK-NEXT: # encoding: [0x75,A]
+; CHECK-NEXT: je .LBB34_1 # encoding: [0x74,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB34_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB34_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -1044,13 +1149,16 @@ define void @and32_imm_br() nounwind {
; CHECK-NEXT: andl $-2147483648, g32(%rip) # encoding: [0x81,0x25,A,A,A,A,0x00,0x00,0x00,0x80]
; CHECK-NEXT: # fixup A - offset: 2, value: g32-8, kind: reloc_riprel_4byte
; CHECK-NEXT: # imm = 0x80000000
-; CHECK-NEXT: jne b # TAILCALL
-; CHECK-NEXT: # encoding: [0x75,A]
-; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
+; CHECK-NEXT: jne .LBB35_2 # encoding: [0x75,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB35_2-1, kind: FK_PCRel_1
; CHECK-NEXT: # %bb.1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
+; CHECK-NEXT: .LBB35_2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
entry:
%load1 = load i32, ptr @g32
; And 0x80000000, a positive number requiring 32 bits of immediate.
@@ -1073,10 +1181,13 @@ define void @and32_imm8_br() nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: andl $15, g32(%rip) # encoding: [0x83,0x25,A,A,A,A,0x0f]
; CHECK-NEXT: # fixup A - offset: 2, value: g32-5, kind: reloc_riprel_4byte
-; CHECK-NEXT: jne b # TAILCALL
-; CHECK-NEXT: # encoding: [0x75,A]
+; CHECK-NEXT: je .LBB36_1 # encoding: [0x74,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB36_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB36_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -1101,10 +1212,13 @@ define void @and32_imm8_neg_br() nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: andl $-4, g32(%rip) # encoding: [0x83,0x25,A,A,A,A,0xfc]
; CHECK-NEXT: # fixup A - offset: 2, value: g32-5, kind: reloc_riprel_4byte
-; CHECK-NEXT: jne b # TAILCALL
-; CHECK-NEXT: # encoding: [0x75,A]
+; CHECK-NEXT: je .LBB37_1 # encoding: [0x74,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB37_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB37_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -1130,13 +1244,16 @@ define void @and16_imm_br() nounwind {
; CHECK-NEXT: andw $-32768, g16(%rip) # encoding: [0x66,0x81,0x25,A,A,A,A,0x00,0x80]
; CHECK-NEXT: # fixup A - offset: 3, value: g16-6, kind: reloc_riprel_4byte
; CHECK-NEXT: # imm = 0x8000
-; CHECK-NEXT: jne b # TAILCALL
-; CHECK-NEXT: # encoding: [0x75,A]
-; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
+; CHECK-NEXT: jne .LBB38_2 # encoding: [0x75,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB38_2-1, kind: FK_PCRel_1
; CHECK-NEXT: # %bb.1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
+; CHECK-NEXT: .LBB38_2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
entry:
%load1 = load i16, ptr @g16
%and = and i16 %load1, 32768
@@ -1158,10 +1275,13 @@ define void @and16_imm8_br() nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: andw $15, g16(%rip) # encoding: [0x66,0x83,0x25,A,A,A,A,0x0f]
; CHECK-NEXT: # fixup A - offset: 3, value: g16-5, kind: reloc_riprel_4byte
-; CHECK-NEXT: jne b # TAILCALL
-; CHECK-NEXT: # encoding: [0x75,A]
+; CHECK-NEXT: je .LBB39_1 # encoding: [0x74,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB39_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB39_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -1186,10 +1306,13 @@ define void @and16_imm8_neg_br() nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: andw $-4, g16(%rip) # encoding: [0x66,0x83,0x25,A,A,A,A,0xfc]
; CHECK-NEXT: # fixup A - offset: 3, value: g16-5, kind: reloc_riprel_4byte
-; CHECK-NEXT: jne b # TAILCALL
-; CHECK-NEXT: # encoding: [0x75,A]
+; CHECK-NEXT: je .LBB40_1 # encoding: [0x74,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB40_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB40_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -1214,10 +1337,13 @@ define void @and8_imm_br() nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: andb $-4, g8(%rip) # encoding: [0x80,0x25,A,A,A,A,0xfc]
; CHECK-NEXT: # fixup A - offset: 2, value: g8-5, kind: reloc_riprel_4byte
-; CHECK-NEXT: jne b # TAILCALL
-; CHECK-NEXT: # encoding: [0x75,A]
+; CHECK-NEXT: je .LBB41_1 # encoding: [0x74,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB41_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB41_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -1242,10 +1368,13 @@ define void @and64_reg_br(i64 %arg) nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: andq %rdi, g64(%rip) # encoding: [0x48,0x21,0x3d,A,A,A,A]
; CHECK-NEXT: # fixup A - offset: 3, value: g64-4, kind: reloc_riprel_4byte
-; CHECK-NEXT: jne b # TAILCALL
-; CHECK-NEXT: # encoding: [0x75,A]
+; CHECK-NEXT: je .LBB42_1 # encoding: [0x74,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB42_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB42_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -1270,10 +1399,13 @@ define void @and32_reg_br(i32 %arg) nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: andl %edi, g32(%rip) # encoding: [0x21,0x3d,A,A,A,A]
; CHECK-NEXT: # fixup A - offset: 2, value: g32-4, kind: reloc_riprel_4byte
-; CHECK-NEXT: jne b # TAILCALL
-; CHECK-NEXT: # encoding: [0x75,A]
+; CHECK-NEXT: je .LBB43_1 # encoding: [0x74,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB43_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB43_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -1298,10 +1430,13 @@ define void @and16_reg_br(i16 %arg) nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: andw %di, g16(%rip) # encoding: [0x66,0x21,0x3d,A,A,A,A]
; CHECK-NEXT: # fixup A - offset: 3, value: g16-4, kind: reloc_riprel_4byte
-; CHECK-NEXT: jne b # TAILCALL
-; CHECK-NEXT: # encoding: [0x75,A]
+; CHECK-NEXT: je .LBB44_1 # encoding: [0x74,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB44_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB44_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -1326,10 +1461,13 @@ define void @and8_reg_br(i8 %arg) nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: andb %dil, g8(%rip) # encoding: [0x40,0x20,0x3d,A,A,A,A]
; CHECK-NEXT: # fixup A - offset: 3, value: g8-4, kind: reloc_riprel_4byte
-; CHECK-NEXT: jne b # TAILCALL
-; CHECK-NEXT: # encoding: [0x75,A]
+; CHECK-NEXT: je .LBB45_1 # encoding: [0x74,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB45_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB45_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -1355,10 +1493,13 @@ define void @or64_imm32_br() nounwind {
; CHECK-NEXT: orq $16777215, g64(%rip) # encoding: [0x48,0x81,0x0d,A,A,A,A,0xff,0xff,0xff,0x00]
; CHECK-NEXT: # fixup A - offset: 3, value: g64-8, kind: reloc_riprel_4byte
; CHECK-NEXT: # imm = 0xFFFFFF
-; CHECK-NEXT: jne b # TAILCALL
-; CHECK-NEXT: # encoding: [0x75,A]
+; CHECK-NEXT: je .LBB46_1 # encoding: [0x74,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB46_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB46_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -1385,10 +1526,13 @@ define void @or64_sext_imm32_br() nounwind {
; CHECK-NEXT: orq $-2147483648, g64(%rip) # encoding: [0x48,0x81,0x0d,A,A,A,A,0x00,0x00,0x00,0x80]
; CHECK-NEXT: # fixup A - offset: 3, value: g64-8, kind: reloc_riprel_4byte
; CHECK-NEXT: # imm = 0x80000000
-; CHECK-NEXT: jne b # TAILCALL
-; CHECK-NEXT: # encoding: [0x75,A]
+; CHECK-NEXT: je .LBB47_1 # encoding: [0x74,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB47_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB47_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -1414,10 +1558,13 @@ define void @or64_imm8_br() nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: orq $15, g64(%rip) # encoding: [0x48,0x83,0x0d,A,A,A,A,0x0f]
; CHECK-NEXT: # fixup A - offset: 3, value: g64-5, kind: reloc_riprel_4byte
-; CHECK-NEXT: jne b # TAILCALL
-; CHECK-NEXT: # encoding: [0x75,A]
+; CHECK-NEXT: je .LBB48_1 # encoding: [0x74,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB48_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB48_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -1442,10 +1589,13 @@ define void @or64_imm8_neg_br() nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: orq $-4, g64(%rip) # encoding: [0x48,0x83,0x0d,A,A,A,A,0xfc]
; CHECK-NEXT: # fixup A - offset: 3, value: g64-5, kind: reloc_riprel_4byte
-; CHECK-NEXT: jne b # TAILCALL
-; CHECK-NEXT: # encoding: [0x75,A]
+; CHECK-NEXT: je .LBB49_1 # encoding: [0x74,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB49_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB49_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -1471,10 +1621,13 @@ define void @or32_imm_br() nounwind {
; CHECK-NEXT: orl $-2147483648, g32(%rip) # encoding: [0x81,0x0d,A,A,A,A,0x00,0x00,0x00,0x80]
; CHECK-NEXT: # fixup A - offset: 2, value: g32-8, kind: reloc_riprel_4byte
; CHECK-NEXT: # imm = 0x80000000
-; CHECK-NEXT: jne b # TAILCALL
-; CHECK-NEXT: # encoding: [0x75,A]
+; CHECK-NEXT: je .LBB50_1 # encoding: [0x74,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB50_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB50_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -1500,10 +1653,13 @@ define void @or32_imm8_br() nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: orl $15, g32(%rip) # encoding: [0x83,0x0d,A,A,A,A,0x0f]
; CHECK-NEXT: # fixup A - offset: 2, value: g32-5, kind: reloc_riprel_4byte
-; CHECK-NEXT: jne b # TAILCALL
-; CHECK-NEXT: # encoding: [0x75,A]
+; CHECK-NEXT: je .LBB51_1 # encoding: [0x74,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB51_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB51_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -1528,10 +1684,13 @@ define void @or32_imm8_neg_br() nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: orl $-4, g32(%rip) # encoding: [0x83,0x0d,A,A,A,A,0xfc]
; CHECK-NEXT: # fixup A - offset: 2, value: g32-5, kind: reloc_riprel_4byte
-; CHECK-NEXT: jne b # TAILCALL
-; CHECK-NEXT: # encoding: [0x75,A]
+; CHECK-NEXT: je .LBB52_1 # encoding: [0x74,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB52_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB52_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -1557,10 +1716,13 @@ define void @or16_imm_br() nounwind {
; CHECK-NEXT: orw $-32768, g16(%rip) # encoding: [0x66,0x81,0x0d,A,A,A,A,0x00,0x80]
; CHECK-NEXT: # fixup A - offset: 3, value: g16-6, kind: reloc_riprel_4byte
; CHECK-NEXT: # imm = 0x8000
-; CHECK-NEXT: jne b # TAILCALL
-; CHECK-NEXT: # encoding: [0x75,A]
+; CHECK-NEXT: je .LBB53_1 # encoding: [0x74,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB53_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB53_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -1585,10 +1747,13 @@ define void @or16_imm8_br() nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: orw $15, g16(%rip) # encoding: [0x66,0x83,0x0d,A,A,A,A,0x0f]
; CHECK-NEXT: # fixup A - offset: 3, value: g16-5, kind: reloc_riprel_4byte
-; CHECK-NEXT: jne b # TAILCALL
-; CHECK-NEXT: # encoding: [0x75,A]
+; CHECK-NEXT: je .LBB54_1 # encoding: [0x74,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB54_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB54_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -1613,10 +1778,13 @@ define void @or16_imm8_neg_br() nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: orw $-4, g16(%rip) # encoding: [0x66,0x83,0x0d,A,A,A,A,0xfc]
; CHECK-NEXT: # fixup A - offset: 3, value: g16-5, kind: reloc_riprel_4byte
-; CHECK-NEXT: jne b # TAILCALL
-; CHECK-NEXT: # encoding: [0x75,A]
+; CHECK-NEXT: je .LBB55_1 # encoding: [0x74,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB55_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB55_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -1641,10 +1809,13 @@ define void @or8_imm_br() nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: orb $-4, g8(%rip) # encoding: [0x80,0x0d,A,A,A,A,0xfc]
; CHECK-NEXT: # fixup A - offset: 2, value: g8-5, kind: reloc_riprel_4byte
-; CHECK-NEXT: jne b # TAILCALL
-; CHECK-NEXT: # encoding: [0x75,A]
+; CHECK-NEXT: je .LBB56_1 # encoding: [0x74,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB56_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB56_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -1669,10 +1840,13 @@ define void @or64_reg_br(i64 %arg) nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: orq %rdi, g64(%rip) # encoding: [0x48,0x09,0x3d,A,A,A,A]
; CHECK-NEXT: # fixup A - offset: 3, value: g64-4, kind: reloc_riprel_4byte
-; CHECK-NEXT: jne b # TAILCALL
-; CHECK-NEXT: # encoding: [0x75,A]
+; CHECK-NEXT: je .LBB57_1 # encoding: [0x74,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB57_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB57_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -1697,10 +1871,13 @@ define void @or32_reg_br(i32 %arg) nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: orl %edi, g32(%rip) # encoding: [0x09,0x3d,A,A,A,A]
; CHECK-NEXT: # fixup A - offset: 2, value: g32-4, kind: reloc_riprel_4byte
-; CHECK-NEXT: jne b # TAILCALL
-; CHECK-NEXT: # encoding: [0x75,A]
+; CHECK-NEXT: je .LBB58_1 # encoding: [0x74,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB58_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB58_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -1725,10 +1902,13 @@ define void @or16_reg_br(i16 %arg) nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: orw %di, g16(%rip) # encoding: [0x66,0x09,0x3d,A,A,A,A]
; CHECK-NEXT: # fixup A - offset: 3, value: g16-4, kind: reloc_riprel_4byte
-; CHECK-NEXT: jne b # TAILCALL
-; CHECK-NEXT: # encoding: [0x75,A]
+; CHECK-NEXT: je .LBB59_1 # encoding: [0x74,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB59_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB59_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -1753,10 +1933,13 @@ define void @or8_reg_br(i8 %arg) nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: orb %dil, g8(%rip) # encoding: [0x40,0x08,0x3d,A,A,A,A]
; CHECK-NEXT: # fixup A - offset: 3, value: g8-4, kind: reloc_riprel_4byte
-; CHECK-NEXT: jne b # TAILCALL
-; CHECK-NEXT: # encoding: [0x75,A]
+; CHECK-NEXT: je .LBB60_1 # encoding: [0x74,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB60_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB60_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -1782,10 +1965,13 @@ define void @xor64_imm32_br() nounwind {
; CHECK-NEXT: xorq $16777215, g64(%rip) # encoding: [0x48,0x81,0x35,A,A,A,A,0xff,0xff,0xff,0x00]
; CHECK-NEXT: # fixup A - offset: 3, value: g64-8, kind: reloc_riprel_4byte
; CHECK-NEXT: # imm = 0xFFFFFF
-; CHECK-NEXT: jne b # TAILCALL
-; CHECK-NEXT: # encoding: [0x75,A]
+; CHECK-NEXT: je .LBB61_1 # encoding: [0x74,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB61_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB61_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -1812,10 +1998,13 @@ define void @xor64_sext_imm32_br() nounwind {
; CHECK-NEXT: xorq $-2147483648, g64(%rip) # encoding: [0x48,0x81,0x35,A,A,A,A,0x00,0x00,0x00,0x80]
; CHECK-NEXT: # fixup A - offset: 3, value: g64-8, kind: reloc_riprel_4byte
; CHECK-NEXT: # imm = 0x80000000
-; CHECK-NEXT: jne b # TAILCALL
-; CHECK-NEXT: # encoding: [0x75,A]
+; CHECK-NEXT: je .LBB62_1 # encoding: [0x74,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB62_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB62_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -1841,10 +2030,13 @@ define void @xor64_imm8_br() nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: xorq $15, g64(%rip) # encoding: [0x48,0x83,0x35,A,A,A,A,0x0f]
; CHECK-NEXT: # fixup A - offset: 3, value: g64-5, kind: reloc_riprel_4byte
-; CHECK-NEXT: jne b # TAILCALL
-; CHECK-NEXT: # encoding: [0x75,A]
+; CHECK-NEXT: je .LBB63_1 # encoding: [0x74,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB63_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB63_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -1869,10 +2061,13 @@ define void @xor64_imm8_neg_br() nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: xorq $-4, g64(%rip) # encoding: [0x48,0x83,0x35,A,A,A,A,0xfc]
; CHECK-NEXT: # fixup A - offset: 3, value: g64-5, kind: reloc_riprel_4byte
-; CHECK-NEXT: jne b # TAILCALL
-; CHECK-NEXT: # encoding: [0x75,A]
+; CHECK-NEXT: je .LBB64_1 # encoding: [0x74,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB64_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB64_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -1898,10 +2093,13 @@ define void @xor32_imm_br() nounwind {
; CHECK-NEXT: xorl $-2147483648, g32(%rip) # encoding: [0x81,0x35,A,A,A,A,0x00,0x00,0x00,0x80]
; CHECK-NEXT: # fixup A - offset: 2, value: g32-8, kind: reloc_riprel_4byte
; CHECK-NEXT: # imm = 0x80000000
-; CHECK-NEXT: jne b # TAILCALL
-; CHECK-NEXT: # encoding: [0x75,A]
+; CHECK-NEXT: je .LBB65_1 # encoding: [0x74,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB65_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB65_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -1927,10 +2125,13 @@ define void @xor32_imm8_br() nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: xorl $15, g32(%rip) # encoding: [0x83,0x35,A,A,A,A,0x0f]
; CHECK-NEXT: # fixup A - offset: 2, value: g32-5, kind: reloc_riprel_4byte
-; CHECK-NEXT: jne b # TAILCALL
-; CHECK-NEXT: # encoding: [0x75,A]
+; CHECK-NEXT: je .LBB66_1 # encoding: [0x74,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB66_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB66_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -1955,10 +2156,13 @@ define void @xor32_imm8_neg_br() nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: xorl $-4, g32(%rip) # encoding: [0x83,0x35,A,A,A,A,0xfc]
; CHECK-NEXT: # fixup A - offset: 2, value: g32-5, kind: reloc_riprel_4byte
-; CHECK-NEXT: jne b # TAILCALL
-; CHECK-NEXT: # encoding: [0x75,A]
+; CHECK-NEXT: je .LBB67_1 # encoding: [0x74,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB67_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB67_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -1984,10 +2188,13 @@ define void @xor16_imm_br() nounwind {
; CHECK-NEXT: xorw $-32768, g16(%rip) # encoding: [0x66,0x81,0x35,A,A,A,A,0x00,0x80]
; CHECK-NEXT: # fixup A - offset: 3, value: g16-6, kind: reloc_riprel_4byte
; CHECK-NEXT: # imm = 0x8000
-; CHECK-NEXT: jne b # TAILCALL
-; CHECK-NEXT: # encoding: [0x75,A]
+; CHECK-NEXT: je .LBB68_1 # encoding: [0x74,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB68_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB68_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -2012,10 +2219,13 @@ define void @xor16_imm8_br() nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: xorw $15, g16(%rip) # encoding: [0x66,0x83,0x35,A,A,A,A,0x0f]
; CHECK-NEXT: # fixup A - offset: 3, value: g16-5, kind: reloc_riprel_4byte
-; CHECK-NEXT: jne b # TAILCALL
-; CHECK-NEXT: # encoding: [0x75,A]
+; CHECK-NEXT: je .LBB69_1 # encoding: [0x74,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB69_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB69_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -2040,10 +2250,13 @@ define void @xor16_imm8_neg_br() nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: xorw $-4, g16(%rip) # encoding: [0x66,0x83,0x35,A,A,A,A,0xfc]
; CHECK-NEXT: # fixup A - offset: 3, value: g16-5, kind: reloc_riprel_4byte
-; CHECK-NEXT: jne b # TAILCALL
-; CHECK-NEXT: # encoding: [0x75,A]
+; CHECK-NEXT: je .LBB70_1 # encoding: [0x74,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB70_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB70_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -2068,10 +2281,13 @@ define void @xor8_imm_br() nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: xorb $-4, g8(%rip) # encoding: [0x80,0x35,A,A,A,A,0xfc]
; CHECK-NEXT: # fixup A - offset: 2, value: g8-5, kind: reloc_riprel_4byte
-; CHECK-NEXT: jne b # TAILCALL
-; CHECK-NEXT: # encoding: [0x75,A]
+; CHECK-NEXT: je .LBB71_1 # encoding: [0x74,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB71_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB71_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -2096,10 +2312,13 @@ define void @xor64_reg_br(i64 %arg) nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: xorq %rdi, g64(%rip) # encoding: [0x48,0x31,0x3d,A,A,A,A]
; CHECK-NEXT: # fixup A - offset: 3, value: g64-4, kind: reloc_riprel_4byte
-; CHECK-NEXT: jne b # TAILCALL
-; CHECK-NEXT: # encoding: [0x75,A]
+; CHECK-NEXT: je .LBB72_1 # encoding: [0x74,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB72_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB72_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -2124,10 +2343,13 @@ define void @xor32_reg_br(i32 %arg) nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: xorl %edi, g32(%rip) # encoding: [0x31,0x3d,A,A,A,A]
; CHECK-NEXT: # fixup A - offset: 2, value: g32-4, kind: reloc_riprel_4byte
-; CHECK-NEXT: jne b # TAILCALL
-; CHECK-NEXT: # encoding: [0x75,A]
+; CHECK-NEXT: je .LBB73_1 # encoding: [0x74,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB73_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB73_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -2152,10 +2374,13 @@ define void @xor16_reg_br(i16 %arg) nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: xorw %di, g16(%rip) # encoding: [0x66,0x31,0x3d,A,A,A,A]
; CHECK-NEXT: # fixup A - offset: 3, value: g16-4, kind: reloc_riprel_4byte
-; CHECK-NEXT: jne b # TAILCALL
-; CHECK-NEXT: # encoding: [0x75,A]
+; CHECK-NEXT: je .LBB74_1 # encoding: [0x74,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB74_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB74_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -2180,10 +2405,13 @@ define void @xor8_reg_br(i8 %arg) nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: xorb %dil, g8(%rip) # encoding: [0x40,0x30,0x3d,A,A,A,A]
; CHECK-NEXT: # fixup A - offset: 3, value: g8-4, kind: reloc_riprel_4byte
-; CHECK-NEXT: jne b # TAILCALL
-; CHECK-NEXT: # encoding: [0x75,A]
+; CHECK-NEXT: je .LBB75_1 # encoding: [0x74,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB75_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB75_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -2208,10 +2436,13 @@ define void @neg64_br() nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: negq g64(%rip) # encoding: [0x48,0xf7,0x1d,A,A,A,A]
; CHECK-NEXT: # fixup A - offset: 3, value: g64-4, kind: reloc_riprel_4byte
-; CHECK-NEXT: jns b # TAILCALL
-; CHECK-NEXT: # encoding: [0x79,A]
+; CHECK-NEXT: js .LBB76_1 # encoding: [0x78,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB76_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB76_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -2236,10 +2467,13 @@ define void @neg32_br() nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: negl g32(%rip) # encoding: [0xf7,0x1d,A,A,A,A]
; CHECK-NEXT: # fixup A - offset: 2, value: g32-4, kind: reloc_riprel_4byte
-; CHECK-NEXT: jns b # TAILCALL
-; CHECK-NEXT: # encoding: [0x79,A]
+; CHECK-NEXT: js .LBB77_1 # encoding: [0x78,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB77_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB77_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -2264,10 +2498,13 @@ define void @neg16_br() nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: negw g16(%rip) # encoding: [0x66,0xf7,0x1d,A,A,A,A]
; CHECK-NEXT: # fixup A - offset: 3, value: g16-4, kind: reloc_riprel_4byte
-; CHECK-NEXT: jns b # TAILCALL
-; CHECK-NEXT: # encoding: [0x79,A]
+; CHECK-NEXT: js .LBB78_1 # encoding: [0x78,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB78_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB78_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
@@ -2292,10 +2529,13 @@ define void @neg8_br() nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: negb g8(%rip) # encoding: [0xf6,0x1d,A,A,A,A]
; CHECK-NEXT: # fixup A - offset: 2, value: g8-4, kind: reloc_riprel_4byte
-; CHECK-NEXT: jns b # TAILCALL
-; CHECK-NEXT: # encoding: [0x79,A]
+; CHECK-NEXT: js .LBB79_1 # encoding: [0x78,A]
+; CHECK-NEXT: # fixup A - offset: 1, value: .LBB79_1-1, kind: FK_PCRel_1
+; CHECK-NEXT: # %bb.2: # %b
+; CHECK-NEXT: jmp b # TAILCALL
+; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: b-1, kind: FK_PCRel_1
-; CHECK-NEXT: # %bb.1: # %a
+; CHECK-NEXT: .LBB79_1: # %a
; CHECK-NEXT: jmp a # TAILCALL
; CHECK-NEXT: # encoding: [0xeb,A]
; CHECK-NEXT: # fixup A - offset: 1, value: a-1, kind: FK_PCRel_1
diff --git a/llvm/test/CodeGen/X86/fp-strict-scalar-cmp-fp16.ll b/llvm/test/CodeGen/X86/fp-strict-scalar-cmp-fp16.ll
index d256e9e760d2c..db5246d622713 100644
--- a/llvm/test/CodeGen/X86/fp-strict-scalar-cmp-fp16.ll
+++ b/llvm/test/CodeGen/X86/fp-strict-scalar-cmp-fp16.ll
@@ -1776,23 +1776,29 @@ define void @foo(half %0, half %1) #0 {
; AVX-NEXT: vmovd %eax, %xmm1
; AVX-NEXT: vcvtph2ps %xmm1, %xmm1
; AVX-NEXT: vucomiss %xmm0, %xmm1
-; AVX-NEXT: ja bar at PLT # TAILCALL
-; AVX-NEXT: # %bb.1:
+; AVX-NEXT: jbe .LBB28_1
+; AVX-NEXT: # %bb.2:
+; AVX-NEXT: jmp bar at PLT # TAILCALL
+; AVX-NEXT: .LBB28_1:
; AVX-NEXT: retq
;
; CHECK-32-LABEL: foo:
; CHECK-32: # %bb.0:
; CHECK-32-NEXT: vmovsh {{[0-9]+}}(%esp), %xmm0
; CHECK-32-NEXT: vucomish {{[0-9]+}}(%esp), %xmm0
-; CHECK-32-NEXT: ja bar at PLT # TAILCALL
-; CHECK-32-NEXT: # %bb.1:
+; CHECK-32-NEXT: jbe .LBB28_1
+; CHECK-32-NEXT: # %bb.2:
+; CHECK-32-NEXT: jmp bar at PLT # TAILCALL
+; CHECK-32-NEXT: .LBB28_1:
; CHECK-32-NEXT: retl
;
; CHECK-64-LABEL: foo:
; CHECK-64: # %bb.0:
; CHECK-64-NEXT: vucomish %xmm1, %xmm0
-; CHECK-64-NEXT: ja bar at PLT # TAILCALL
-; CHECK-64-NEXT: # %bb.1:
+; CHECK-64-NEXT: jbe .LBB28_1
+; CHECK-64-NEXT: # %bb.2:
+; CHECK-64-NEXT: jmp bar at PLT # TAILCALL
+; CHECK-64-NEXT: .LBB28_1:
; CHECK-64-NEXT: retq
%3 = call i1 @llvm.experimental.constrained.fcmp.f16( half %0, half %1, metadata !"ogt", metadata !"fpexcept.strict") #0
br i1 %3, label %4, label %5
diff --git a/llvm/test/CodeGen/X86/fp-strict-scalar-cmp.ll b/llvm/test/CodeGen/X86/fp-strict-scalar-cmp.ll
index cb1876fee05ae..9b28e05cefc5a 100644
--- a/llvm/test/CodeGen/X86/fp-strict-scalar-cmp.ll
+++ b/llvm/test/CodeGen/X86/fp-strict-scalar-cmp.ll
@@ -4141,30 +4141,38 @@ define void @foo(float %0, float %1) #0 {
; SSE-32: # %bb.0:
; SSE-32-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
; SSE-32-NEXT: ucomiss {{[0-9]+}}(%esp), %xmm0
-; SSE-32-NEXT: ja bar # TAILCALL
-; SSE-32-NEXT: # %bb.1:
+; SSE-32-NEXT: jbe .LBB56_1
+; SSE-32-NEXT: # %bb.2:
+; SSE-32-NEXT: jmp bar # TAILCALL
+; SSE-32-NEXT: .LBB56_1:
; SSE-32-NEXT: retl
;
; SSE-64-LABEL: foo:
; SSE-64: # %bb.0:
; SSE-64-NEXT: ucomiss %xmm1, %xmm0
-; SSE-64-NEXT: ja bar # TAILCALL
-; SSE-64-NEXT: # %bb.1:
+; SSE-64-NEXT: jbe .LBB56_1
+; SSE-64-NEXT: # %bb.2:
+; SSE-64-NEXT: jmp bar # TAILCALL
+; SSE-64-NEXT: .LBB56_1:
; SSE-64-NEXT: retq
;
; AVX-32-LABEL: foo:
; AVX-32: # %bb.0:
; AVX-32-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
; AVX-32-NEXT: vucomiss {{[0-9]+}}(%esp), %xmm0
-; AVX-32-NEXT: ja bar # TAILCALL
-; AVX-32-NEXT: # %bb.1:
+; AVX-32-NEXT: jbe .LBB56_1
+; AVX-32-NEXT: # %bb.2:
+; AVX-32-NEXT: jmp bar # TAILCALL
+; AVX-32-NEXT: .LBB56_1:
; AVX-32-NEXT: retl
;
; AVX-64-LABEL: foo:
; AVX-64: # %bb.0:
; AVX-64-NEXT: vucomiss %xmm1, %xmm0
-; AVX-64-NEXT: ja bar # TAILCALL
-; AVX-64-NEXT: # %bb.1:
+; AVX-64-NEXT: jbe .LBB56_1
+; AVX-64-NEXT: # %bb.2:
+; AVX-64-NEXT: jmp bar # TAILCALL
+; AVX-64-NEXT: .LBB56_1:
; AVX-64-NEXT: retq
;
; X87-LABEL: foo:
@@ -4176,8 +4184,10 @@ define void @foo(float %0, float %1) #0 {
; X87-NEXT: fnstsw %ax
; X87-NEXT: # kill: def $ah killed $ah killed $ax
; X87-NEXT: sahf
-; X87-NEXT: ja bar # TAILCALL
-; X87-NEXT: # %bb.1:
+; X87-NEXT: jbe .LBB56_1
+; X87-NEXT: # %bb.2:
+; X87-NEXT: jmp bar # TAILCALL
+; X87-NEXT: .LBB56_1:
; X87-NEXT: retl
;
; X87-CMOV-LABEL: foo:
@@ -4187,8 +4197,10 @@ define void @foo(float %0, float %1) #0 {
; X87-CMOV-NEXT: fucompi %st(1), %st
; X87-CMOV-NEXT: fstp %st(0)
; X87-CMOV-NEXT: wait
-; X87-CMOV-NEXT: ja bar # TAILCALL
-; X87-CMOV-NEXT: # %bb.1:
+; X87-CMOV-NEXT: jbe .LBB56_1
+; X87-CMOV-NEXT: # %bb.2:
+; X87-CMOV-NEXT: jmp bar # TAILCALL
+; X87-CMOV-NEXT: .LBB56_1:
; X87-CMOV-NEXT: retl
%3 = call i1 @llvm.experimental.constrained.fcmp.f32( float %0, float %1, metadata !"ogt", metadata !"fpexcept.strict") #0
br i1 %3, label %4, label %5
diff --git a/llvm/test/CodeGen/X86/funnel-shift.ll b/llvm/test/CodeGen/X86/funnel-shift.ll
index ec916148e8e20..31874097170d3 100644
--- a/llvm/test/CodeGen/X86/funnel-shift.ll
+++ b/llvm/test/CodeGen/X86/funnel-shift.ll
@@ -1017,8 +1017,10 @@ define void @PR45265(i32 %0, %struct.S* nocapture readonly %1) nounwind {
; X64-AVX2-NEXT: movq (%rsi,%rcx,4), %rcx
; X64-AVX2-NEXT: shrdq $40, %rdi, %rcx
; X64-AVX2-NEXT: cmpq %rax, %rcx
-; X64-AVX2-NEXT: je _Z3foov # TAILCALL
-; X64-AVX2-NEXT: # %bb.1:
+; X64-AVX2-NEXT: jne .LBB46_1
+; X64-AVX2-NEXT: # %bb.2:
+; X64-AVX2-NEXT: jmp _Z3foov # TAILCALL
+; X64-AVX2-NEXT: .LBB46_1:
; X64-AVX2-NEXT: retq
%3 = sext i32 %0 to i64
%4 = getelementptr inbounds %struct.S, %struct.S* %1, i64 %3
diff --git a/llvm/test/CodeGen/X86/jump_sign.ll b/llvm/test/CodeGen/X86/jump_sign.ll
index de7aaf276a9c7..d6af68e1feecf 100644
--- a/llvm/test/CodeGen/X86/jump_sign.ll
+++ b/llvm/test/CodeGen/X86/jump_sign.ll
@@ -6,9 +6,10 @@ define i32 @func_f(i32 %X) {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: movl {{[0-9]+}}(%esp), %eax
; CHECK-NEXT: incl %eax
-; CHECK-NEXT: jns baz at PLT # TAILCALL
+; CHECK-NEXT: jns .LBB0_2
; CHECK-NEXT: # %bb.1: # %cond_true
; CHECK-NEXT: calll bar at PLT
+; CHECK-NEXT: .LBB0_2: # %cond_next
; CHECK-NEXT: jmp baz at PLT # TAILCALL
entry:
%tmp1 = add i32 %X, 1
diff --git a/llvm/test/CodeGen/X86/neg_cmp.ll b/llvm/test/CodeGen/X86/neg_cmp.ll
index f7745b04751e7..2d4784cc7adf8 100644
--- a/llvm/test/CodeGen/X86/neg_cmp.ll
+++ b/llvm/test/CodeGen/X86/neg_cmp.ll
@@ -10,8 +10,10 @@ define void @neg_cmp(i32 %x, i32 %y) nounwind {
; CHECK-LABEL: neg_cmp:
; CHECK: # %bb.0:
; CHECK-NEXT: addl %esi, %edi
-; CHECK-NEXT: je g # TAILCALL
-; CHECK-NEXT: # %bb.1: # %if.end
+; CHECK-NEXT: jne .LBB0_1
+; CHECK-NEXT: # %bb.2: # %if.then
+; CHECK-NEXT: jmp g # TAILCALL
+; CHECK-NEXT: .LBB0_1: # %if.end
; CHECK-NEXT: retq
%sub = sub i32 0, %y
%cmp = icmp eq i32 %x, %sub
@@ -29,8 +31,10 @@ define void @neg_cmp_commuted(i32 %x, i32 %y) nounwind {
; CHECK-LABEL: neg_cmp_commuted:
; CHECK: # %bb.0:
; CHECK-NEXT: addl %esi, %edi
-; CHECK-NEXT: je g # TAILCALL
-; CHECK-NEXT: # %bb.1: # %if.end
+; CHECK-NEXT: jne .LBB1_1
+; CHECK-NEXT: # %bb.2: # %if.then
+; CHECK-NEXT: jmp g # TAILCALL
+; CHECK-NEXT: .LBB1_1: # %if.end
; CHECK-NEXT: retq
%sub = sub i32 0, %y
%cmp = icmp eq i32 %sub, %x
diff --git a/llvm/test/CodeGen/X86/or-branch.ll b/llvm/test/CodeGen/X86/or-branch.ll
index 5d5cc2cb32f1c..c9f6e3e49632b 100644
--- a/llvm/test/CodeGen/X86/or-branch.ll
+++ b/llvm/test/CodeGen/X86/or-branch.ll
@@ -6,12 +6,14 @@ define void @foo(i32 %X, i32 %Y, i32 %Z) nounwind {
; JUMP2-LABEL: foo:
; JUMP2: # %bb.0: # %entry
; JUMP2-NEXT: cmpl $5, {{[0-9]+}}(%esp)
-; JUMP2-NEXT: jl bar at PLT # TAILCALL
+; JUMP2-NEXT: jl .LBB0_3
; JUMP2-NEXT: # %bb.1: # %entry
; JUMP2-NEXT: cmpl $0, {{[0-9]+}}(%esp)
-; JUMP2-NEXT: je bar at PLT # TAILCALL
+; JUMP2-NEXT: je .LBB0_3
; JUMP2-NEXT: # %bb.2: # %UnifiedReturnBlock
; JUMP2-NEXT: retl
+; JUMP2-NEXT: .LBB0_3: # %cond_true
+; JUMP2-NEXT: jmp bar at PLT # TAILCALL
;
; JUMP1-LABEL: foo:
; JUMP1: # %bb.0: # %entry
@@ -20,8 +22,10 @@ define void @foo(i32 %X, i32 %Y, i32 %Z) nounwind {
; JUMP1-NEXT: cmpl $5, {{[0-9]+}}(%esp)
; JUMP1-NEXT: setge %cl
; JUMP1-NEXT: testb %al, %cl
-; JUMP1-NEXT: je bar at PLT # TAILCALL
-; JUMP1-NEXT: # %bb.1: # %UnifiedReturnBlock
+; JUMP1-NEXT: jne .LBB0_1
+; JUMP1-NEXT: # %bb.2: # %cond_true
+; JUMP1-NEXT: jmp bar at PLT # TAILCALL
+; JUMP1-NEXT: .LBB0_1: # %UnifiedReturnBlock
; JUMP1-NEXT: retl
entry:
%tmp1 = icmp eq i32 %X, 0
@@ -48,8 +52,10 @@ define void @unpredictable(i32 %X, i32 %Y, i32 %Z) nounwind {
; JUMP2-NEXT: cmpl $5, {{[0-9]+}}(%esp)
; JUMP2-NEXT: setge %cl
; JUMP2-NEXT: testb %al, %cl
-; JUMP2-NEXT: je bar at PLT # TAILCALL
-; JUMP2-NEXT: # %bb.1: # %UnifiedReturnBlock
+; JUMP2-NEXT: jne .LBB1_1
+; JUMP2-NEXT: # %bb.2: # %cond_true
+; JUMP2-NEXT: jmp bar at PLT # TAILCALL
+; JUMP2-NEXT: .LBB1_1: # %UnifiedReturnBlock
; JUMP2-NEXT: retl
;
; JUMP1-LABEL: unpredictable:
@@ -59,8 +65,10 @@ define void @unpredictable(i32 %X, i32 %Y, i32 %Z) nounwind {
; JUMP1-NEXT: cmpl $5, {{[0-9]+}}(%esp)
; JUMP1-NEXT: setge %cl
; JUMP1-NEXT: testb %al, %cl
-; JUMP1-NEXT: je bar at PLT # TAILCALL
-; JUMP1-NEXT: # %bb.1: # %UnifiedReturnBlock
+; JUMP1-NEXT: jne .LBB1_1
+; JUMP1-NEXT: # %bb.2: # %cond_true
+; JUMP1-NEXT: jmp bar at PLT # TAILCALL
+; JUMP1-NEXT: .LBB1_1: # %UnifiedReturnBlock
; JUMP1-NEXT: retl
entry:
%tmp1 = icmp eq i32 %X, 0
diff --git a/llvm/test/CodeGen/X86/peep-test-4.ll b/llvm/test/CodeGen/X86/peep-test-4.ll
index bcecb0584179b..9406ea7d14e5b 100644
--- a/llvm/test/CodeGen/X86/peep-test-4.ll
+++ b/llvm/test/CodeGen/X86/peep-test-4.ll
@@ -8,8 +8,10 @@ define void @neg(i32 %x) nounwind {
; CHECK-LABEL: neg:
; CHECK: # %bb.0:
; CHECK-NEXT: negl %edi
-; CHECK-NEXT: jne foo # TAILCALL
-; CHECK-NEXT: # %bb.1: # %return
+; CHECK-NEXT: je .LBB0_1
+; CHECK-NEXT: # %bb.2: # %bb
+; CHECK-NEXT: jmp foo # TAILCALL
+; CHECK-NEXT: .LBB0_1: # %return
; CHECK-NEXT: retq
%sub = sub i32 0, %x
%cmp = icmp eq i32 %sub, 0
@@ -27,8 +29,10 @@ define void @sar(i32 %x) nounwind {
; CHECK-LABEL: sar:
; CHECK: # %bb.0:
; CHECK-NEXT: sarl %edi
-; CHECK-NEXT: jne foo # TAILCALL
-; CHECK-NEXT: # %bb.1: # %return
+; CHECK-NEXT: je .LBB1_1
+; CHECK-NEXT: # %bb.2: # %bb
+; CHECK-NEXT: jmp foo # TAILCALL
+; CHECK-NEXT: .LBB1_1: # %return
; CHECK-NEXT: retq
%ashr = ashr i32 %x, 1
%cmp = icmp eq i32 %ashr, 0
@@ -46,8 +50,10 @@ define void @shr(i32 %x) nounwind {
; CHECK-LABEL: shr:
; CHECK: # %bb.0:
; CHECK-NEXT: shrl %edi
-; CHECK-NEXT: jne foo # TAILCALL
-; CHECK-NEXT: # %bb.1: # %return
+; CHECK-NEXT: je .LBB2_1
+; CHECK-NEXT: # %bb.2: # %bb
+; CHECK-NEXT: jmp foo # TAILCALL
+; CHECK-NEXT: .LBB2_1: # %return
; CHECK-NEXT: retq
%ashr = lshr i32 %x, 1
%cmp = icmp eq i32 %ashr, 0
@@ -65,8 +71,10 @@ define void @shri(i32 %x) nounwind {
; CHECK-LABEL: shri:
; CHECK: # %bb.0:
; CHECK-NEXT: shrl $3, %edi
-; CHECK-NEXT: jne foo # TAILCALL
-; CHECK-NEXT: # %bb.1: # %return
+; CHECK-NEXT: je .LBB3_1
+; CHECK-NEXT: # %bb.2: # %bb
+; CHECK-NEXT: jmp foo # TAILCALL
+; CHECK-NEXT: .LBB3_1: # %return
; CHECK-NEXT: retq
%ashr = lshr i32 %x, 3
%cmp = icmp eq i32 %ashr, 0
@@ -84,8 +92,10 @@ define void @shl(i32 %x) nounwind {
; CHECK-LABEL: shl:
; CHECK: # %bb.0:
; CHECK-NEXT: addl %edi, %edi
-; CHECK-NEXT: jne foo # TAILCALL
-; CHECK-NEXT: # %bb.1: # %return
+; CHECK-NEXT: je .LBB4_1
+; CHECK-NEXT: # %bb.2: # %bb
+; CHECK-NEXT: jmp foo # TAILCALL
+; CHECK-NEXT: .LBB4_1: # %return
; CHECK-NEXT: retq
%shl = shl i32 %x, 1
%cmp = icmp eq i32 %shl, 0
@@ -103,8 +113,10 @@ define void @shli(i32 %x) nounwind {
; CHECK-LABEL: shli:
; CHECK: # %bb.0:
; CHECK-NEXT: shll $4, %edi
-; CHECK-NEXT: jne foo # TAILCALL
-; CHECK-NEXT: # %bb.1: # %return
+; CHECK-NEXT: je .LBB5_1
+; CHECK-NEXT: # %bb.2: # %bb
+; CHECK-NEXT: jmp foo # TAILCALL
+; CHECK-NEXT: .LBB5_1: # %return
; CHECK-NEXT: retq
%shl = shl i32 %x, 4
%cmp = icmp eq i32 %shl, 0
@@ -147,8 +159,10 @@ define void @andn(i32 %x, i32 %y) nounwind {
; CHECK-LABEL: andn:
; CHECK: # %bb.0:
; CHECK-NEXT: andnl %esi, %edi, %edi
-; CHECK-NEXT: jne foo # TAILCALL
-; CHECK-NEXT: # %bb.1: # %return
+; CHECK-NEXT: je .LBB8_1
+; CHECK-NEXT: # %bb.2: # %bb
+; CHECK-NEXT: jmp foo # TAILCALL
+; CHECK-NEXT: .LBB8_1: # %return
; CHECK-NEXT: retq
%not = xor i32 %x, -1
%andn = and i32 %y, %not
@@ -168,8 +182,10 @@ define void @bextr(i32 %x, i32 %y) nounwind {
; CHECK-LABEL: bextr:
; CHECK: # %bb.0:
; CHECK-NEXT: bextrl %esi, %edi, %edi
-; CHECK-NEXT: jne foo # TAILCALL
-; CHECK-NEXT: # %bb.1: # %return
+; CHECK-NEXT: je .LBB9_1
+; CHECK-NEXT: # %bb.2: # %bb
+; CHECK-NEXT: jmp foo # TAILCALL
+; CHECK-NEXT: .LBB9_1: # %return
; CHECK-NEXT: retq
%bextr = tail call i32 @llvm.x86.bmi.bextr.32(i32 %x, i32 %y)
%cmp = icmp eq i32 %bextr, 0
@@ -188,8 +204,10 @@ define void @popcnt(i32 %x) nounwind {
; CHECK-LABEL: popcnt:
; CHECK: # %bb.0:
; CHECK-NEXT: popcntl %edi, %edi
-; CHECK-NEXT: jne foo # TAILCALL
-; CHECK-NEXT: # %bb.1: # %return
+; CHECK-NEXT: je .LBB10_1
+; CHECK-NEXT: # %bb.2: # %bb
+; CHECK-NEXT: jmp foo # TAILCALL
+; CHECK-NEXT: .LBB10_1: # %return
; CHECK-NEXT: retq
%popcnt = tail call i32 @llvm.ctpop.i32(i32 %x)
%cmp = icmp eq i32 %popcnt, 0
diff --git a/llvm/test/CodeGen/X86/pr37025.ll b/llvm/test/CodeGen/X86/pr37025.ll
index a758ddc91541b..4fad1592d5232 100644
--- a/llvm/test/CodeGen/X86/pr37025.ll
+++ b/llvm/test/CodeGen/X86/pr37025.ll
@@ -21,7 +21,9 @@ define void @test_dec_select(ptr nocapture %0, ptr readnone %1) {
; CHECK-NEXT: jne .LBB0_2
; CHECK-NEXT: # %bb.1:
; CHECK-NEXT: testq %rsi, %rsi
-; CHECK-NEXT: jne func2 # TAILCALL
+; CHECK-NEXT: je .LBB0_2
+; CHECK-NEXT: # %bb.3:
+; CHECK-NEXT: jmp func2 # TAILCALL
; CHECK-NEXT: .LBB0_2:
; CHECK-NEXT: retq
%3 = atomicrmw sub ptr %0, i64 1 seq_cst
@@ -47,7 +49,9 @@ define void @test_dec_select_commute(ptr nocapture %0, ptr readnone %1) {
; CHECK-NEXT: je .LBB1_2
; CHECK-NEXT: # %bb.1:
; CHECK-NEXT: testb %al, %al
-; CHECK-NEXT: jne func2 # TAILCALL
+; CHECK-NEXT: je .LBB1_2
+; CHECK-NEXT: # %bb.3:
+; CHECK-NEXT: jmp func2 # TAILCALL
; CHECK-NEXT: .LBB1_2:
; CHECK-NEXT: retq
%3 = atomicrmw sub ptr %0, i64 1 seq_cst
@@ -73,7 +77,9 @@ define void @test_dec_and(ptr nocapture %0, ptr readnone %1) {
; CHECK-NEXT: je .LBB2_2
; CHECK-NEXT: # %bb.1:
; CHECK-NEXT: testb %al, %al
-; CHECK-NEXT: jne func2 # TAILCALL
+; CHECK-NEXT: je .LBB2_2
+; CHECK-NEXT: # %bb.3:
+; CHECK-NEXT: jmp func2 # TAILCALL
; CHECK-NEXT: .LBB2_2:
; CHECK-NEXT: retq
%3 = atomicrmw sub ptr %0, i64 1 seq_cst
@@ -97,7 +103,9 @@ define void @test_dec_and_commute(ptr nocapture %0, ptr readnone %1) {
; CHECK-NEXT: jne .LBB3_2
; CHECK-NEXT: # %bb.1:
; CHECK-NEXT: testq %rsi, %rsi
-; CHECK-NEXT: jne func2 # TAILCALL
+; CHECK-NEXT: je .LBB3_2
+; CHECK-NEXT: # %bb.3:
+; CHECK-NEXT: jmp func2 # TAILCALL
; CHECK-NEXT: .LBB3_2:
; CHECK-NEXT: retq
%3 = atomicrmw sub ptr %0, i64 1 seq_cst
diff --git a/llvm/test/CodeGen/X86/pr37063.ll b/llvm/test/CodeGen/X86/pr37063.ll
index 281da0c11f1f7..d6532acf79612 100644
--- a/llvm/test/CodeGen/X86/pr37063.ll
+++ b/llvm/test/CodeGen/X86/pr37063.ll
@@ -9,9 +9,11 @@ define void @foo(ptr) {
; CHECK-NEXT: movl (%rdi), %eax
; CHECK-NEXT: andl $6, %eax
; CHECK-NEXT: cmpl $4, %eax
-; CHECK-NEXT: jne bar # TAILCALL
+; CHECK-NEXT: jne .LBB0_2
; CHECK-NEXT: # %bb.1: # %bb1
; CHECK-NEXT: retq
+; CHECK-NEXT: .LBB0_2: # %bb2.i
+; CHECK-NEXT: jmp bar # TAILCALL
start:
%1 = load i64, ptr %0, align 8, !range !0
%2 = and i64 %1, 6
diff --git a/llvm/test/CodeGen/X86/rd-mod-wr-eflags.ll b/llvm/test/CodeGen/X86/rd-mod-wr-eflags.ll
index b0f1b2ea73c91..0bc5925a93286 100644
--- a/llvm/test/CodeGen/X86/rd-mod-wr-eflags.ll
+++ b/llvm/test/CodeGen/X86/rd-mod-wr-eflags.ll
@@ -7,9 +7,11 @@ define dso_local void @_Z7releaseP3obj(ptr nocapture %o) nounwind uwtable ssp {
; CHECK-LABEL: _Z7releaseP3obj:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: decq (%rdi)
-; CHECK-NEXT: je free # TAILCALL
+; CHECK-NEXT: je .LBB0_2
; CHECK-NEXT: # %bb.1: # %return
; CHECK-NEXT: retq
+; CHECK-NEXT: .LBB0_2: # %if.end
+; CHECK-NEXT: jmp free # TAILCALL
entry:
%0 = load i64, ptr %o, align 8
%dec = add i64 %0, -1
@@ -110,9 +112,11 @@ define dso_local void @example_dec(ptr %o) nounwind uwtable ssp {
; CHECK-NEXT: jne .LBB3_4
; CHECK-NEXT: # %bb.3: # %if.end2
; CHECK-NEXT: decb 14(%rdi)
-; CHECK-NEXT: je other # TAILCALL
+; CHECK-NEXT: je .LBB3_5
; CHECK-NEXT: .LBB3_4: # %return
; CHECK-NEXT: retq
+; CHECK-NEXT: .LBB3_5: # %if.end4
+; CHECK-NEXT: jmp other # TAILCALL
entry:
%0 = load i64, ptr %o, align 8
%dec = add i64 %0, -1
@@ -169,7 +173,9 @@ define dso_local void @example_inc(ptr %o) nounwind uwtable ssp {
; CHECK-NEXT: jne .LBB4_4
; CHECK-NEXT: # %bb.3: # %if.end2
; CHECK-NEXT: incb 14(%rdi)
-; CHECK-NEXT: je other # TAILCALL
+; CHECK-NEXT: jne .LBB4_4
+; CHECK-NEXT: # %bb.5: # %if.end4
+; CHECK-NEXT: jmp other # TAILCALL
; CHECK-NEXT: .LBB4_4: # %return
; CHECK-NEXT: retq
entry:
@@ -223,9 +229,11 @@ define dso_local void @test3() nounwind ssp {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: movq foo(%rip), %rax
; CHECK-NEXT: decq 16(%rax)
-; CHECK-NEXT: je baz # TAILCALL
+; CHECK-NEXT: je .LBB5_2
; CHECK-NEXT: # %bb.1: # %if.end
; CHECK-NEXT: retq
+; CHECK-NEXT: .LBB5_2: # %if.then
+; CHECK-NEXT: jmp baz # TAILCALL
entry:
%0 = load ptr, ptr @foo, align 8
%arrayidx = getelementptr inbounds i64, ptr %0, i64 2
diff --git a/llvm/test/CodeGen/X86/segmented-stacks.ll b/llvm/test/CodeGen/X86/segmented-stacks.ll
index 7304fedd28758..033e7530e0851 100644
--- a/llvm/test/CodeGen/X86/segmented-stacks.ll
+++ b/llvm/test/CodeGen/X86/segmented-stacks.ll
@@ -1720,8 +1720,10 @@ define i32 @test_sibling_call_empty_frame(i32 %x) #0 {
; X86-Linux-LABEL: test_sibling_call_empty_frame:
; X86-Linux: # %bb.0:
; X86-Linux-NEXT: cmpl %gs:48, %esp
-; X86-Linux-NEXT: ja callee at PLT # TAILCALL
-; X86-Linux-NEXT: # %bb.1:
+; X86-Linux-NEXT: jbe .LBB8_1
+; X86-Linux-NEXT: # %bb.2:
+; X86-Linux-NEXT: jmp callee at PLT # TAILCALL
+; X86-Linux-NEXT: .LBB8_1:
; X86-Linux-NEXT: pushl $4
; X86-Linux-NEXT: pushl $0
; X86-Linux-NEXT: calll __morestack
@@ -1731,8 +1733,10 @@ define i32 @test_sibling_call_empty_frame(i32 %x) #0 {
; X64-Linux-LABEL: test_sibling_call_empty_frame:
; X64-Linux: # %bb.0:
; X64-Linux-NEXT: cmpq %fs:112, %rsp
-; X64-Linux-NEXT: ja callee at PLT # TAILCALL
-; X64-Linux-NEXT: # %bb.1:
+; X64-Linux-NEXT: jbe .LBB8_1
+; X64-Linux-NEXT: # %bb.2:
+; X64-Linux-NEXT: jmp callee at PLT # TAILCALL
+; X64-Linux-NEXT: .LBB8_1:
; X64-Linux-NEXT: movl $0, %r10d
; X64-Linux-NEXT: movl $0, %r11d
; X64-Linux-NEXT: callq __morestack
@@ -1757,8 +1761,10 @@ define i32 @test_sibling_call_empty_frame(i32 %x) #0 {
; X32ABI-LABEL: test_sibling_call_empty_frame:
; X32ABI: # %bb.0:
; X32ABI-NEXT: cmpl %fs:64, %esp
-; X32ABI-NEXT: ja callee at PLT # TAILCALL
-; X32ABI-NEXT: # %bb.1:
+; X32ABI-NEXT: jbe .LBB8_1
+; X32ABI-NEXT: # %bb.2:
+; X32ABI-NEXT: jmp callee at PLT # TAILCALL
+; X32ABI-NEXT: .LBB8_1:
; X32ABI-NEXT: movl $0, %r10d
; X32ABI-NEXT: movl $0, %r11d
; X32ABI-NEXT: callq __morestack
@@ -1769,8 +1775,10 @@ define i32 @test_sibling_call_empty_frame(i32 %x) #0 {
; X86-Darwin: ## %bb.0:
; X86-Darwin-NEXT: movl $432, %ecx ## imm = 0x1B0
; X86-Darwin-NEXT: cmpl %gs:(%ecx), %esp
-; X86-Darwin-NEXT: ja _callee ## TAILCALL
-; X86-Darwin-NEXT: ## %bb.1:
+; X86-Darwin-NEXT: jbe LBB8_1
+; X86-Darwin-NEXT: ## %bb.2:
+; X86-Darwin-NEXT: jmp _callee ## TAILCALL
+; X86-Darwin-NEXT: LBB8_1:
; X86-Darwin-NEXT: pushl $4
; X86-Darwin-NEXT: pushl $0
; X86-Darwin-NEXT: calll ___morestack
@@ -1780,8 +1788,10 @@ define i32 @test_sibling_call_empty_frame(i32 %x) #0 {
; X64-Darwin-LABEL: test_sibling_call_empty_frame:
; X64-Darwin: ## %bb.0:
; X64-Darwin-NEXT: cmpq %gs:816, %rsp
-; X64-Darwin-NEXT: ja _callee ## TAILCALL
-; X64-Darwin-NEXT: ## %bb.1:
+; X64-Darwin-NEXT: jbe LBB8_1
+; X64-Darwin-NEXT: ## %bb.2:
+; X64-Darwin-NEXT: jmp _callee ## TAILCALL
+; X64-Darwin-NEXT: LBB8_1:
; X64-Darwin-NEXT: movl $0, %r10d
; X64-Darwin-NEXT: movl $0, %r11d
; X64-Darwin-NEXT: callq ___morestack
@@ -1791,8 +1801,10 @@ define i32 @test_sibling_call_empty_frame(i32 %x) #0 {
; X86-MinGW-LABEL: test_sibling_call_empty_frame:
; X86-MinGW: # %bb.0:
; X86-MinGW-NEXT: cmpl %fs:20, %esp
-; X86-MinGW-NEXT: ja _callee # TAILCALL
-; X86-MinGW-NEXT: # %bb.1:
+; X86-MinGW-NEXT: jbe LBB8_1
+; X86-MinGW-NEXT: # %bb.2:
+; X86-MinGW-NEXT: jmp _callee # TAILCALL
+; X86-MinGW-NEXT: LBB8_1:
; X86-MinGW-NEXT: pushl $4
; X86-MinGW-NEXT: pushl $0
; X86-MinGW-NEXT: calll ___morestack
@@ -1802,8 +1814,10 @@ define i32 @test_sibling_call_empty_frame(i32 %x) #0 {
; X64-FreeBSD-LABEL: test_sibling_call_empty_frame:
; X64-FreeBSD: # %bb.0:
; X64-FreeBSD-NEXT: cmpq %fs:24, %rsp
-; X64-FreeBSD-NEXT: ja callee at PLT # TAILCALL
-; X64-FreeBSD-NEXT: # %bb.1:
+; X64-FreeBSD-NEXT: jbe .LBB8_1
+; X64-FreeBSD-NEXT: # %bb.2:
+; X64-FreeBSD-NEXT: jmp callee at PLT # TAILCALL
+; X64-FreeBSD-NEXT: .LBB8_1:
; X64-FreeBSD-NEXT: movl $0, %r10d
; X64-FreeBSD-NEXT: movl $0, %r11d
; X64-FreeBSD-NEXT: callq __morestack
@@ -1813,8 +1827,10 @@ define i32 @test_sibling_call_empty_frame(i32 %x) #0 {
; X86-DFlyBSD-LABEL: test_sibling_call_empty_frame:
; X86-DFlyBSD: # %bb.0:
; X86-DFlyBSD-NEXT: cmpl %fs:16, %esp
-; X86-DFlyBSD-NEXT: ja callee at PLT # TAILCALL
-; X86-DFlyBSD-NEXT: # %bb.1:
+; X86-DFlyBSD-NEXT: jbe .LBB8_1
+; X86-DFlyBSD-NEXT: # %bb.2:
+; X86-DFlyBSD-NEXT: jmp callee at PLT # TAILCALL
+; X86-DFlyBSD-NEXT: .LBB8_1:
; X86-DFlyBSD-NEXT: pushl $4
; X86-DFlyBSD-NEXT: pushl $0
; X86-DFlyBSD-NEXT: calll __morestack
@@ -1824,8 +1840,10 @@ define i32 @test_sibling_call_empty_frame(i32 %x) #0 {
; X64-DFlyBSD-LABEL: test_sibling_call_empty_frame:
; X64-DFlyBSD: # %bb.0:
; X64-DFlyBSD-NEXT: cmpq %fs:32, %rsp
-; X64-DFlyBSD-NEXT: ja callee at PLT # TAILCALL
-; X64-DFlyBSD-NEXT: # %bb.1:
+; X64-DFlyBSD-NEXT: jbe .LBB8_1
+; X64-DFlyBSD-NEXT: # %bb.2:
+; X64-DFlyBSD-NEXT: jmp callee at PLT # TAILCALL
+; X64-DFlyBSD-NEXT: .LBB8_1:
; X64-DFlyBSD-NEXT: movl $0, %r10d
; X64-DFlyBSD-NEXT: movl $0, %r11d
; X64-DFlyBSD-NEXT: callq __morestack
@@ -1835,8 +1853,10 @@ define i32 @test_sibling_call_empty_frame(i32 %x) #0 {
; X64-MinGW-LABEL: test_sibling_call_empty_frame:
; X64-MinGW: # %bb.0:
; X64-MinGW-NEXT: cmpq %gs:40, %rsp
-; X64-MinGW-NEXT: ja callee # TAILCALL
-; X64-MinGW-NEXT: # %bb.1:
+; X64-MinGW-NEXT: jbe .LBB8_1
+; X64-MinGW-NEXT: # %bb.2:
+; X64-MinGW-NEXT: jmp callee # TAILCALL
+; X64-MinGW-NEXT: .LBB8_1:
; X64-MinGW-NEXT: movl $0, %r10d
; X64-MinGW-NEXT: movl $32, %r11d
; X64-MinGW-NEXT: callq __morestack
diff --git a/llvm/test/CodeGen/X86/sibcall.ll b/llvm/test/CodeGen/X86/sibcall.ll
index 4a0a68ee32243..d72b7465b3fa1 100644
--- a/llvm/test/CodeGen/X86/sibcall.ll
+++ b/llvm/test/CodeGen/X86/sibcall.ll
@@ -138,18 +138,22 @@ define dso_local i32 @t6(i32 %x) nounwind ssp {
; X64-LABEL: t6:
; X64: # %bb.0:
; X64-NEXT: cmpl $9, %edi
-; X64-NEXT: jg bar # TAILCALL
+; X64-NEXT: jg .LBB6_2
; X64-NEXT: # %bb.1: # %bb
; X64-NEXT: decl %edi
; X64-NEXT: jmp t6 # TAILCALL
+; X64-NEXT: .LBB6_2: # %bb1
+; X64-NEXT: jmp bar # TAILCALL
;
; X32-LABEL: t6:
; X32: # %bb.0:
; X32-NEXT: cmpl $9, %edi
-; X32-NEXT: jg bar # TAILCALL
+; X32-NEXT: jg .LBB6_2
; X32-NEXT: # %bb.1: # %bb
; X32-NEXT: decl %edi
; X32-NEXT: jmp t6 # TAILCALL
+; X32-NEXT: .LBB6_2: # %bb1
+; X32-NEXT: jmp bar # TAILCALL
%t0 = icmp slt i32 %x, 10
br i1 %t0, label %bb, label %bb1
@@ -256,24 +260,30 @@ define dso_local i32 @t11(i32 %x, i32 %y, i32 %z.0, i32 %z.1, i32 %z.2) nounwind
; X86-LABEL: t11:
; X86: # %bb.0: # %entry
; X86-NEXT: cmpl $0, {{[0-9]+}}(%esp)
-; X86-NEXT: jne foo5 # TAILCALL
-; X86-NEXT: # %bb.1: # %bb6
+; X86-NEXT: je .LBB11_1
+; X86-NEXT: # %bb.2: # %bb
+; X86-NEXT: jmp foo5 # TAILCALL
+; X86-NEXT: .LBB11_1: # %bb6
; X86-NEXT: xorl %eax, %eax
; X86-NEXT: retl
;
; X64-LABEL: t11:
; X64: # %bb.0: # %entry
; X64-NEXT: testl %edi, %edi
-; X64-NEXT: jne foo5 # TAILCALL
-; X64-NEXT: # %bb.1: # %bb6
+; X64-NEXT: je .LBB11_1
+; X64-NEXT: # %bb.2: # %bb
+; X64-NEXT: jmp foo5 # TAILCALL
+; X64-NEXT: .LBB11_1: # %bb6
; X64-NEXT: xorl %eax, %eax
; X64-NEXT: retq
;
; X32-LABEL: t11:
; X32: # %bb.0: # %entry
; X32-NEXT: testl %edi, %edi
-; X32-NEXT: jne foo5 # TAILCALL
-; X32-NEXT: # %bb.1: # %bb6
+; X32-NEXT: je .LBB11_1
+; X32-NEXT: # %bb.2: # %bb
+; X32-NEXT: jmp foo5 # TAILCALL
+; X32-NEXT: .LBB11_1: # %bb6
; X32-NEXT: xorl %eax, %eax
; X32-NEXT: retq
entry:
@@ -296,24 +306,30 @@ define dso_local i32 @t12(i32 %x, i32 %y, ptr byval(%struct.t) align 4 %z) nounw
; X86-LABEL: t12:
; X86: # %bb.0: # %entry
; X86-NEXT: cmpl $0, {{[0-9]+}}(%esp)
-; X86-NEXT: jne foo6 # TAILCALL
-; X86-NEXT: # %bb.1: # %bb2
+; X86-NEXT: je .LBB12_1
+; X86-NEXT: # %bb.2: # %bb
+; X86-NEXT: jmp foo6 # TAILCALL
+; X86-NEXT: .LBB12_1: # %bb2
; X86-NEXT: xorl %eax, %eax
; X86-NEXT: retl
;
; X64-LABEL: t12:
; X64: # %bb.0: # %entry
; X64-NEXT: testl %edi, %edi
-; X64-NEXT: jne foo6 # TAILCALL
-; X64-NEXT: # %bb.1: # %bb2
+; X64-NEXT: je .LBB12_1
+; X64-NEXT: # %bb.2: # %bb
+; X64-NEXT: jmp foo6 # TAILCALL
+; X64-NEXT: .LBB12_1: # %bb2
; X64-NEXT: xorl %eax, %eax
; X64-NEXT: retq
;
; X32-LABEL: t12:
; X32: # %bb.0: # %entry
; X32-NEXT: testl %edi, %edi
-; X32-NEXT: jne foo6 # TAILCALL
-; X32-NEXT: # %bb.1: # %bb2
+; X32-NEXT: je .LBB12_1
+; X32-NEXT: # %bb.2: # %bb
+; X32-NEXT: jmp foo6 # TAILCALL
+; X32-NEXT: .LBB12_1: # %bb2
; X32-NEXT: xorl %eax, %eax
; X32-NEXT: retq
entry:
@@ -968,11 +984,11 @@ define ccc void @t22_non_sret_to_sret(ptr %agg.result) nounwind {
;
; X64-LABEL: t22_non_sret_to_sret:
; X64: # %bb.0:
-; X64-NEXT: jmp t22_f_sret at PLT # TAILCALL
+; X64-NEXT: jmp t22_f_sret at PLT # TAILCALL
;
; X32-LABEL: t22_non_sret_to_sret:
; X32: # %bb.0:
-; X32-NEXT: jmp t22_f_sret at PLT # TAILCALL
+; X32-NEXT: jmp t22_f_sret at PLT # TAILCALL
tail call ccc void @t22_f_sret(ptr noalias sret(%struct.foo) %agg.result) nounwind
ret void
}
diff --git a/llvm/test/CodeGen/X86/slow-incdec.ll b/llvm/test/CodeGen/X86/slow-incdec.ll
index 3b0be767fbb94..8c53709895d70 100644
--- a/llvm/test/CodeGen/X86/slow-incdec.ll
+++ b/llvm/test/CodeGen/X86/slow-incdec.ll
@@ -82,16 +82,20 @@ define void @cond_ae_to_cond_ne(ptr %p) nounwind {
; INCDEC: # %bb.0: # %entry
; INCDEC-NEXT: movl {{[0-9]+}}(%esp), %eax
; INCDEC-NEXT: incl (%eax)
-; INCDEC-NEXT: je other at PLT # TAILCALL
-; INCDEC-NEXT: # %bb.1: # %return
+; INCDEC-NEXT: jne .LBB6_1
+; INCDEC-NEXT: # %bb.2: # %if.end4
+; INCDEC-NEXT: jmp other at PLT # TAILCALL
+; INCDEC-NEXT: .LBB6_1: # %return
; INCDEC-NEXT: retl
;
; ADD-LABEL: cond_ae_to_cond_ne:
; ADD: # %bb.0: # %entry
; ADD-NEXT: movl {{[0-9]+}}(%esp), %eax
; ADD-NEXT: addl $1, (%eax)
-; ADD-NEXT: je other at PLT # TAILCALL
-; ADD-NEXT: # %bb.1: # %return
+; ADD-NEXT: jne .LBB6_1
+; ADD-NEXT: # %bb.2: # %if.end4
+; ADD-NEXT: jmp other at PLT # TAILCALL
+; ADD-NEXT: .LBB6_1: # %return
; ADD-NEXT: retl
entry:
%t0 = load i32, ptr %p, align 8
@@ -125,9 +129,11 @@ define void @test_tail_call(ptr %ptr) nounwind {
; INCDEC-NEXT: incb a
; INCDEC-NEXT: sete d
; INCDEC-NEXT: testb %al, %al
-; INCDEC-NEXT: jne external_b at PLT # TAILCALL
+; INCDEC-NEXT: jne .LBB7_2
; INCDEC-NEXT: # %bb.1: # %then
; INCDEC-NEXT: jmp external_a at PLT # TAILCALL
+; INCDEC-NEXT: .LBB7_2: # %else
+; INCDEC-NEXT: jmp external_b at PLT # TAILCALL
;
; ADD-LABEL: test_tail_call:
; ADD: # %bb.0: # %entry
@@ -137,9 +143,11 @@ define void @test_tail_call(ptr %ptr) nounwind {
; ADD-NEXT: addb $1, a
; ADD-NEXT: sete d
; ADD-NEXT: testb %al, %al
-; ADD-NEXT: jne external_b at PLT # TAILCALL
+; ADD-NEXT: jne .LBB7_2
; ADD-NEXT: # %bb.1: # %then
; ADD-NEXT: jmp external_a at PLT # TAILCALL
+; ADD-NEXT: .LBB7_2: # %else
+; ADD-NEXT: jmp external_b at PLT # TAILCALL
entry:
%val = load i32, ptr %ptr
%add_ov = call {i32, i1} @llvm.uadd.with.overflow.i32(i32 %val, i32 1)
diff --git a/llvm/test/CodeGen/X86/sqrt-partial.ll b/llvm/test/CodeGen/X86/sqrt-partial.ll
index 9e13b9abd898a..00fa2d4a96f1c 100644
--- a/llvm/test/CodeGen/X86/sqrt-partial.ll
+++ b/llvm/test/CodeGen/X86/sqrt-partial.ll
@@ -14,19 +14,23 @@ define float @f(float %val) nounwind {
; SSE: # %bb.0:
; SSE-NEXT: xorps %xmm1, %xmm1
; SSE-NEXT: ucomiss %xmm1, %xmm0
-; SSE-NEXT: jb sqrtf # TAILCALL
+; SSE-NEXT: jb .LBB0_2
; SSE-NEXT: # %bb.1: # %.split
; SSE-NEXT: sqrtss %xmm0, %xmm0
; SSE-NEXT: retq
+; SSE-NEXT: .LBB0_2: # %call.sqrt
+; SSE-NEXT: jmp sqrtf # TAILCALL
;
; AVX-LABEL: f:
; AVX: # %bb.0:
; AVX-NEXT: vxorps %xmm1, %xmm1, %xmm1
; AVX-NEXT: vucomiss %xmm1, %xmm0
-; AVX-NEXT: jb sqrtf # TAILCALL
+; AVX-NEXT: jb .LBB0_2
; AVX-NEXT: # %bb.1: # %.split
; AVX-NEXT: vsqrtss %xmm0, %xmm0, %xmm0
; AVX-NEXT: retq
+; AVX-NEXT: .LBB0_2: # %call.sqrt
+; AVX-NEXT: jmp sqrtf # TAILCALL
%res = tail call float @sqrtf(float %val)
ret float %res
}
@@ -36,19 +40,23 @@ define double @d(double %val) nounwind {
; SSE: # %bb.0:
; SSE-NEXT: xorpd %xmm1, %xmm1
; SSE-NEXT: ucomisd %xmm1, %xmm0
-; SSE-NEXT: jb sqrt # TAILCALL
+; SSE-NEXT: jb .LBB1_2
; SSE-NEXT: # %bb.1: # %.split
; SSE-NEXT: sqrtsd %xmm0, %xmm0
; SSE-NEXT: retq
+; SSE-NEXT: .LBB1_2: # %call.sqrt
+; SSE-NEXT: jmp sqrt # TAILCALL
;
; AVX-LABEL: d:
; AVX: # %bb.0:
; AVX-NEXT: vxorpd %xmm1, %xmm1, %xmm1
; AVX-NEXT: vucomisd %xmm1, %xmm0
-; AVX-NEXT: jb sqrt # TAILCALL
+; AVX-NEXT: jb .LBB1_2
; AVX-NEXT: # %bb.1: # %.split
; AVX-NEXT: vsqrtsd %xmm0, %xmm0, %xmm0
; AVX-NEXT: retq
+; AVX-NEXT: .LBB1_2: # %call.sqrt
+; AVX-NEXT: jmp sqrt # TAILCALL
%res = tail call double @sqrt(double %val)
ret double %res
}
diff --git a/llvm/test/CodeGen/X86/switch-bt.ll b/llvm/test/CodeGen/X86/switch-bt.ll
index 2181ab963d093..f5b74082eac91 100644
--- a/llvm/test/CodeGen/X86/switch-bt.ll
+++ b/llvm/test/CodeGen/X86/switch-bt.ll
@@ -86,7 +86,9 @@ define void @test2(i32 %x) nounwind ssp {
; CHECK-NEXT: # %bb.1: # %entry
; CHECK-NEXT: movl $91, %eax
; CHECK-NEXT: btl %edi, %eax
-; CHECK-NEXT: jb bar at PLT # TAILCALL
+; CHECK-NEXT: jae .LBB1_2
+; CHECK-NEXT: # %bb.3: # %if.then
+; CHECK-NEXT: jmp bar at PLT # TAILCALL
; CHECK-NEXT: .LBB1_2: # %if.end
; CHECK-NEXT: retq
@@ -116,7 +118,9 @@ define void @test3(i32 %x) nounwind {
; CHECK-NEXT: ja .LBB2_2
; CHECK-NEXT: # %bb.1:
; CHECK-NEXT: cmpl $4, %edi
-; CHECK-NEXT: jne bar at PLT # TAILCALL
+; CHECK-NEXT: je .LBB2_2
+; CHECK-NEXT: # %bb.3: # %if.then
+; CHECK-NEXT: jmp bar at PLT # TAILCALL
; CHECK-NEXT: .LBB2_2: # %if.end
; CHECK-NEXT: retq
switch i32 %x, label %if.end [
diff --git a/llvm/test/CodeGen/X86/tail-opts.ll b/llvm/test/CodeGen/X86/tail-opts.ll
index 0f04ef9283515..e21d98238aa35 100644
--- a/llvm/test/CodeGen/X86/tail-opts.ll
+++ b/llvm/test/CodeGen/X86/tail-opts.ll
@@ -850,27 +850,28 @@ define dso_local void @bfi_new_block_pgso(i32 %c) nounwind {
; CHECK-LABEL: bfi_new_block_pgso:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: testl %edi, %edi
-; CHECK-NEXT: je .LBB14_6
+; CHECK-NEXT: je .LBB14_4
; CHECK-NEXT: # %bb.1: # %bb1
; CHECK-NEXT: pushq %rax
; CHECK-NEXT: cmpl $16, %edi
-; CHECK-NEXT: je .LBB14_3
+; CHECK-NEXT: je .LBB14_6
; CHECK-NEXT: # %bb.2: # %bb1
; CHECK-NEXT: cmpl $17, %edi
-; CHECK-NEXT: je .LBB14_4
-; CHECK-NEXT: # %bb.5: # %bb4
+; CHECK-NEXT: je .LBB14_7
+; CHECK-NEXT: # %bb.3: # %bb4
; CHECK-NEXT: popq %rax
; CHECK-NEXT: jmp tail_call_me # TAILCALL
-; CHECK-NEXT: .LBB14_6: # %bb5
+; CHECK-NEXT: .LBB14_4: # %bb5
; CHECK-NEXT: cmpl $128, %edi
-; CHECK-NEXT: jne tail_call_me # TAILCALL
-; CHECK-NEXT: # %bb.7: # %return
+; CHECK-NEXT: jne .LBB14_8
+; CHECK-NEXT: # %bb.5: # %return
; CHECK-NEXT: retq
-; CHECK-NEXT: .LBB14_3: # %bb3
+; CHECK-NEXT: .LBB14_6: # %bb3
; CHECK-NEXT: movl $0, GV(%rip)
-; CHECK-NEXT: .LBB14_4: # %bb4
+; CHECK-NEXT: .LBB14_7: # %bb4
; CHECK-NEXT: callq func
; CHECK-NEXT: popq %rax
+; CHECK-NEXT: .LBB14_8: # %bb6
; CHECK-NEXT: jmp tail_call_me # TAILCALL
entry:
%0 = icmp eq i32 %c, 0
diff --git a/llvm/test/CodeGen/X86/tailcall-cgp-dup.ll b/llvm/test/CodeGen/X86/tailcall-cgp-dup.ll
index d8fdce63fecdd..bdb54bbe291ca 100644
--- a/llvm/test/CodeGen/X86/tailcall-cgp-dup.ll
+++ b/llvm/test/CodeGen/X86/tailcall-cgp-dup.ll
@@ -72,7 +72,7 @@ declare ptr @bar(ptr) uwtable optsize noinline ssp
define hidden ptr @thingWithValue(ptr %self) uwtable ssp {
entry:
; CHECK-LABEL: thingWithValue:
-; CHECK: je _bar
+; CHECK: jmp _bar
br i1 undef, label %if.then.i, label %if.else.i
if.then.i: ; preds = %entry
@@ -92,7 +92,7 @@ someThingWithValue.exit: ; preds = %if.else.i, %if.then
declare zeroext i1 @foo_i1()
; CHECK-LABEL: zext_i1
-; CHECK: je _foo_i1
+; CHECK: jmp _foo_i1
define zeroext i1 @zext_i1(i1 %k) {
entry:
br i1 %k, label %land.end, label %land.rhs
@@ -123,8 +123,10 @@ define ptr @f_ret8(ptr %obj) nounwind {
; CHECK-LABEL: f_ret8:
; CHECK: ## %bb.0: ## %entry
; CHECK-NEXT: testq %rdi, %rdi
-; CHECK-NEXT: jne _g_ret32 ## TAILCALL
-; CHECK-NEXT: ## %bb.1: ## %return
+; CHECK-NEXT: je LBB3_1
+; CHECK-NEXT: ## %bb.2: ## %if.then
+; CHECK-NEXT: jmp _g_ret32 ## TAILCALL
+; CHECK-NEXT: LBB3_1: ## %return
; CHECK-NEXT: movq %rdi, %rax
; CHECK-NEXT: retq
entry:
diff --git a/llvm/test/CodeGen/X86/tailcall-extract.ll b/llvm/test/CodeGen/X86/tailcall-extract.ll
index 2d3207e2a9469..3d407e14216af 100644
--- a/llvm/test/CodeGen/X86/tailcall-extract.ll
+++ b/llvm/test/CodeGen/X86/tailcall-extract.ll
@@ -6,8 +6,8 @@
; containing call. And later tail call can be generated.
; CHECK-LABEL: test1:
-; CHECK: je foo # TAILCALL
; CHECK: jmp bar # TAILCALL
+; CHECK: jmp foo # TAILCALL
; OPT-LABEL: test1
; OPT: if.then.i:
@@ -96,8 +96,8 @@ exit:
; offset, so the exit block can still be duplicated, and tail call generated.
; CHECK-LABEL: test3:
-; CHECK: je qux # TAILCALL
; CHECK: jmp baz # TAILCALL
+; CHECK: jmp qux # TAILCALL
; OPT-LABEL: test3
; OPT: if.then.i:
diff --git a/llvm/test/CodeGen/X86/xor-icmp.ll b/llvm/test/CodeGen/X86/xor-icmp.ll
index 16a3b6cb855a7..d1254ada19500 100644
--- a/llvm/test/CodeGen/X86/xor-icmp.ll
+++ b/llvm/test/CodeGen/X86/xor-icmp.ll
@@ -9,8 +9,10 @@ define i32 @t(i32 %a, i32 %b) nounwind ssp {
; X86-NEXT: movzbl {{[0-9]+}}(%esp), %eax
; X86-NEXT: xorb {{[0-9]+}}(%esp), %al
; X86-NEXT: testb $64, %al
-; X86-NEXT: jne bar # TAILCALL
-; X86-NEXT: # %bb.1: # %bb
+; X86-NEXT: je .LBB0_1
+; X86-NEXT: # %bb.2: # %bb1
+; X86-NEXT: jmp bar # TAILCALL
+; X86-NEXT: .LBB0_1: # %bb
; X86-NEXT: jmp foo # TAILCALL
;
; X64-LABEL: t:
@@ -18,8 +20,10 @@ define i32 @t(i32 %a, i32 %b) nounwind ssp {
; X64-NEXT: xorl %esi, %edi
; X64-NEXT: xorl %eax, %eax
; X64-NEXT: testl $16384, %edi # imm = 0x4000
-; X64-NEXT: jne bar # TAILCALL
-; X64-NEXT: # %bb.1: # %bb
+; X64-NEXT: je .LBB0_1
+; X64-NEXT: # %bb.2: # %bb1
+; X64-NEXT: jmp bar # TAILCALL
+; X64-NEXT: .LBB0_1: # %bb
; X64-NEXT: jmp foo # TAILCALL
entry:
%0 = and i32 %a, 16384
@@ -50,8 +54,10 @@ define i32 @t2(i32 %x, i32 %y) nounwind ssp {
; X86-NEXT: cmpl $0, {{[0-9]+}}(%esp)
; X86-NEXT: sete %cl
; X86-NEXT: cmpb %al, %cl
-; X86-NEXT: jne foo # TAILCALL
-; X86-NEXT: # %bb.1: # %return
+; X86-NEXT: je .LBB1_1
+; X86-NEXT: # %bb.2: # %bb
+; X86-NEXT: jmp foo # TAILCALL
+; X86-NEXT: .LBB1_1: # %return
; X86-NEXT: retl
;
; X64-LABEL: t2:
More information about the llvm-commits
mailing list