[llvm] r352314 - [X86] Regenerate reverse branch test to explicitly show branching and condition codes.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 27 04:39:39 PST 2019
Author: rksimon
Date: Sun Jan 27 04:39:38 2019
New Revision: 352314
URL: http://llvm.org/viewvc/llvm-project?rev=352314&view=rev
Log:
[X86] Regenerate reverse branch test to explicitly show branching and condition codes.
Modified:
llvm/trunk/test/CodeGen/X86/reverse_branches.ll
Modified: llvm/trunk/test/CodeGen/X86/reverse_branches.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/reverse_branches.ll?rev=352314&r1=352313&r2=352314&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/reverse_branches.ll (original)
+++ llvm/trunk/test/CodeGen/X86/reverse_branches.ll Sun Jan 27 04:39:38 2019
@@ -1,4 +1,5 @@
-; RUN: llc -mtriple=x86_64-apple-darwin < %s | FileCheck %s
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc < %s -mtriple=x86_64-apple-darwin | FileCheck %s
@.str2 = private unnamed_addr constant [7 x i8] c"memchr\00", align 1
@.str3 = private unnamed_addr constant [11 x i8] c"bsd_memchr\00", align 1
@@ -8,12 +9,142 @@
; inner loop.
define i32 @test_branches_order() uwtable ssp {
; CHECK-LABEL: test_branches_order:
-; CHECK: [[L0:LBB0_[0-9]+]]: ## %do.body.i
-; CHECK: je
-; CHECK: %do.cond.i
-; CHECK: jne [[L0]]
-; CHECK: jmp
-; CHECK: %exit
+; CHECK: ## %bb.0: ## %entry
+; CHECK-NEXT: pushq %rbp
+; CHECK-NEXT: .cfi_def_cfa_offset 16
+; CHECK-NEXT: pushq %r15
+; CHECK-NEXT: .cfi_def_cfa_offset 24
+; CHECK-NEXT: pushq %r14
+; CHECK-NEXT: .cfi_def_cfa_offset 32
+; CHECK-NEXT: pushq %r13
+; CHECK-NEXT: .cfi_def_cfa_offset 40
+; CHECK-NEXT: pushq %r12
+; CHECK-NEXT: .cfi_def_cfa_offset 48
+; CHECK-NEXT: pushq %rbx
+; CHECK-NEXT: .cfi_def_cfa_offset 56
+; CHECK-NEXT: subq $1001016, %rsp ## imm = 0xF4638
+; CHECK-NEXT: .cfi_def_cfa_offset 1001072
+; CHECK-NEXT: .cfi_offset %rbx, -56
+; CHECK-NEXT: .cfi_offset %r12, -48
+; CHECK-NEXT: .cfi_offset %r13, -40
+; CHECK-NEXT: .cfi_offset %r14, -32
+; CHECK-NEXT: .cfi_offset %r15, -24
+; CHECK-NEXT: .cfi_offset %rbp, -16
+; CHECK-NEXT: movq ___stack_chk_guard@{{.*}}(%rip), %rax
+; CHECK-NEXT: movq (%rax), %rax
+; CHECK-NEXT: movq %rax, {{[0-9]+}}(%rsp)
+; CHECK-NEXT: xorl %r12d, %r12d
+; CHECK-NEXT: leaq -{{[0-9]+}}(%rsp), %r14
+; CHECK-NEXT: movq %rsp, %r15
+; CHECK-NEXT: cmpl $999, %r12d ## imm = 0x3E7
+; CHECK-NEXT: jle LBB0_2
+; CHECK-NEXT: jmp LBB0_7
+; CHECK-NEXT: .p2align 4, 0x90
+; CHECK-NEXT: LBB0_6: ## %for.inc9
+; CHECK-NEXT: ## in Loop: Header=BB0_2 Depth=1
+; CHECK-NEXT: incl %r12d
+; CHECK-NEXT: cmpl $999, %r12d ## imm = 0x3E7
+; CHECK-NEXT: jg LBB0_7
+; CHECK-NEXT: LBB0_2: ## %for.cond1.preheader
+; CHECK-NEXT: ## =>This Loop Header: Depth=1
+; CHECK-NEXT: ## Child Loop BB0_3 Depth 2
+; CHECK-NEXT: movl $-1, %r13d
+; CHECK-NEXT: movq %r15, %rbx
+; CHECK-NEXT: movq %r14, %rbp
+; CHECK-NEXT: .p2align 4, 0x90
+; CHECK-NEXT: LBB0_3: ## %for.cond1
+; CHECK-NEXT: ## Parent Loop BB0_2 Depth=1
+; CHECK-NEXT: ## => This Inner Loop Header: Depth=2
+; CHECK-NEXT: incl %r13d
+; CHECK-NEXT: cmpl $999, %r13d ## imm = 0x3E7
+; CHECK-NEXT: jg LBB0_6
+; CHECK-NEXT: ## %bb.4: ## %for.body3
+; CHECK-NEXT: ## in Loop: Header=BB0_3 Depth=2
+; CHECK-NEXT: addq $1002, %rbp ## imm = 0x3EA
+; CHECK-NEXT: movq %rbx, %rdi
+; CHECK-NEXT: leaq 1001(%rbx), %rbx
+; CHECK-NEXT: movl $1000, %edx ## imm = 0x3E8
+; CHECK-NEXT: movl $120, %esi
+; CHECK-NEXT: callq _memchr
+; CHECK-NEXT: cmpq %rax, %rbp
+; CHECK-NEXT: je LBB0_3
+; CHECK-NEXT: jmp LBB0_5
+; CHECK-NEXT: LBB0_7: ## %for.end11
+; CHECK-NEXT: leaq {{.*}}(%rip), %rdi
+; CHECK-NEXT: callq _puts
+; CHECK-NEXT: xorl %eax, %eax
+; CHECK-NEXT: movq %rsp, %rcx
+; CHECK-NEXT: cmpl $999, %eax ## imm = 0x3E7
+; CHECK-NEXT: jle LBB0_9
+; CHECK-NEXT: jmp LBB0_16
+; CHECK-NEXT: .p2align 4, 0x90
+; CHECK-NEXT: LBB0_15: ## %for.inc38
+; CHECK-NEXT: ## in Loop: Header=BB0_9 Depth=1
+; CHECK-NEXT: incl %eax
+; CHECK-NEXT: cmpl $999, %eax ## imm = 0x3E7
+; CHECK-NEXT: jg LBB0_16
+; CHECK-NEXT: LBB0_9: ## %for.cond18.preheader
+; CHECK-NEXT: ## =>This Loop Header: Depth=1
+; CHECK-NEXT: ## Child Loop BB0_10 Depth 2
+; CHECK-NEXT: ## Child Loop BB0_12 Depth 3
+; CHECK-NEXT: movq %rcx, %rdx
+; CHECK-NEXT: xorl %esi, %esi
+; CHECK-NEXT: xorl %edi, %edi
+; CHECK-NEXT: .p2align 4, 0x90
+; CHECK-NEXT: LBB0_10: ## %for.cond18
+; CHECK-NEXT: ## Parent Loop BB0_9 Depth=1
+; CHECK-NEXT: ## => This Loop Header: Depth=2
+; CHECK-NEXT: ## Child Loop BB0_12 Depth 3
+; CHECK-NEXT: cmpl $999, %edi ## imm = 0x3E7
+; CHECK-NEXT: jg LBB0_15
+; CHECK-NEXT: ## %bb.11: ## %for.body20
+; CHECK-NEXT: ## in Loop: Header=BB0_10 Depth=2
+; CHECK-NEXT: movq $-1000, %rbp ## imm = 0xFC18
+; CHECK-NEXT: .p2align 4, 0x90
+; CHECK-NEXT: LBB0_12: ## %do.body.i
+; CHECK-NEXT: ## Parent Loop BB0_9 Depth=1
+; CHECK-NEXT: ## Parent Loop BB0_10 Depth=2
+; CHECK-NEXT: ## => This Inner Loop Header: Depth=3
+; CHECK-NEXT: cmpb $120, 1000(%rdx,%rbp)
+; CHECK-NEXT: je LBB0_14
+; CHECK-NEXT: ## %bb.13: ## %do.cond.i
+; CHECK-NEXT: ## in Loop: Header=BB0_12 Depth=3
+; CHECK-NEXT: incq %rbp
+; CHECK-NEXT: jne LBB0_12
+; CHECK-NEXT: jmp LBB0_5
+; CHECK-NEXT: .p2align 4, 0x90
+; CHECK-NEXT: LBB0_14: ## %exit
+; CHECK-NEXT: ## in Loop: Header=BB0_10 Depth=2
+; CHECK-NEXT: addq %rsi, %rbp
+; CHECK-NEXT: incq %rdi
+; CHECK-NEXT: decq %rsi
+; CHECK-NEXT: addq $1001, %rdx ## imm = 0x3E9
+; CHECK-NEXT: cmpq $-1000, %rbp ## imm = 0xFC18
+; CHECK-NEXT: je LBB0_10
+; CHECK-NEXT: LBB0_5: ## %if.then
+; CHECK-NEXT: leaq {{.*}}(%rip), %rdi
+; CHECK-NEXT: callq _puts
+; CHECK-NEXT: movl $1, %edi
+; CHECK-NEXT: callq _exit
+; CHECK-NEXT: LBB0_16: ## %for.end40
+; CHECK-NEXT: leaq {{.*}}(%rip), %rdi
+; CHECK-NEXT: callq _puts
+; CHECK-NEXT: movq ___stack_chk_guard@{{.*}}(%rip), %rax
+; CHECK-NEXT: movq (%rax), %rax
+; CHECK-NEXT: cmpq {{[0-9]+}}(%rsp), %rax
+; CHECK-NEXT: jne LBB0_18
+; CHECK-NEXT: ## %bb.17: ## %for.end40
+; CHECK-NEXT: xorl %eax, %eax
+; CHECK-NEXT: addq $1001016, %rsp ## imm = 0xF4638
+; CHECK-NEXT: popq %rbx
+; CHECK-NEXT: popq %r12
+; CHECK-NEXT: popq %r13
+; CHECK-NEXT: popq %r14
+; CHECK-NEXT: popq %r15
+; CHECK-NEXT: popq %rbp
+; CHECK-NEXT: retq
+; CHECK-NEXT: LBB0_18: ## %for.end40
+; CHECK-NEXT: callq ___stack_chk_fail
entry:
%strs = alloca [1000 x [1001 x i8]], align 16
br label %for.cond
More information about the llvm-commits
mailing list