[llvm] r356181 - Auto-generate an existing test to make it easier to update
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 14 11:00:00 PDT 2019
Author: reames
Date: Thu Mar 14 10:59:59 2019
New Revision: 356181
URL: http://llvm.org/viewvc/llvm-project?rev=356181&view=rev
Log:
Auto-generate an existing test to make it easier to update
Modified:
llvm/trunk/test/CodeGen/X86/hoist-invariant-load.ll
Modified: llvm/trunk/test/CodeGen/X86/hoist-invariant-load.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/hoist-invariant-load.ll?rev=356181&r1=356180&r2=356181&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/hoist-invariant-load.ll (original)
+++ llvm/trunk/test/CodeGen/X86/hoist-invariant-load.ll Thu Mar 14 10:59:59 2019
@@ -1,5 +1,6 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; REQUIRES: asserts
-; RUN: llc -mcpu=haswell < %s -stats -O2 2>&1 | grep "7 machinelicm.*hoisted"
+; RUN: llc -mcpu=haswell < %s -O2 2>&1 | FileCheck %s
; For test:
; 2 invariant loads, 1 for OBJC_SELECTOR_REFERENCES_
; and 1 for objc_msgSend from the GOT
@@ -17,12 +18,39 @@ target triple = "x86_64-apple-macosx10.7
@llvm.used = appending global [3 x i8*] [i8* getelementptr inbounds ([4 x i8], [4 x i8]* @"\01L_OBJC_METH_VAR_NAME_", i32 0, i32 0), i8* bitcast (i8** @"\01L_OBJC_SELECTOR_REFERENCES_" to i8*), i8* bitcast ([2 x i32]* @"\01L_OBJC_IMAGE_INFO" to i8*)], section "llvm.metadata"
define void @test(i8* %x) uwtable ssp {
+; CHECK-LABEL: test:
+; CHECK: ## %bb.0: ## %entry
+; CHECK-NEXT: pushq %rbp
+; CHECK-NEXT: .cfi_def_cfa_offset 16
+; CHECK-NEXT: pushq %r14
+; CHECK-NEXT: .cfi_def_cfa_offset 24
+; CHECK-NEXT: pushq %rbx
+; CHECK-NEXT: .cfi_def_cfa_offset 32
+; CHECK-NEXT: .cfi_offset %rbx, -32
+; CHECK-NEXT: .cfi_offset %r14, -24
+; CHECK-NEXT: .cfi_offset %rbp, -16
+; CHECK-NEXT: movq %rdi, %rbx
+; CHECK-NEXT: movl $10000, %ebp ## imm = 0x2710
+; CHECK-NEXT: movq _objc_msgSend@{{.*}}(%rip), %r14
+; CHECK-NEXT: .p2align 4, 0x90
+; CHECK-NEXT: LBB0_1: ## %for.body
+; CHECK-NEXT: ## =>This Inner Loop Header: Depth=1
+; CHECK-NEXT: movq {{.*}}(%rip), %rsi
+; CHECK-NEXT: movq %rbx, %rdi
+; CHECK-NEXT: callq *%r14
+; CHECK-NEXT: decl %ebp
+; CHECK-NEXT: jne LBB0_1
+; CHECK-NEXT: ## %bb.2: ## %for.end
+; CHECK-NEXT: popq %rbx
+; CHECK-NEXT: popq %r14
+; CHECK-NEXT: popq %rbp
+; CHECK-NEXT: retq
entry:
br label %for.body
for.body: ; preds = %for.body, %entry
%i.01 = phi i32 [ 0, %entry ], [ %inc, %for.body ]
- %0 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_", align 8, !invariant.load !0
+ %0 = load atomic i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_" unordered, align 8, !invariant.load !0
%call = tail call i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*)*)(i8* %x, i8* %0)
%inc = add i32 %i.01, 1
%exitcond = icmp eq i32 %inc, 10000
@@ -35,6 +63,27 @@ for.end:
declare i8* @objc_msgSend(i8*, i8*, ...) nonlazybind
define void @test_multi_def(i64* dereferenceable(8) %x1,
+; CHECK-LABEL: test_multi_def:
+; CHECK: ## %bb.0: ## %entry
+; CHECK-NEXT: movq %rdx, %r8
+; CHECK-NEXT: xorl %r9d, %r9d
+; CHECK-NEXT: movq (%rdi), %rdi
+; CHECK-NEXT: movq (%rsi), %rsi
+; CHECK-NEXT: .p2align 4, 0x90
+; CHECK-NEXT: LBB1_2: ## %for.body
+; CHECK-NEXT: ## =>This Inner Loop Header: Depth=1
+; CHECK-NEXT: movq %rdi, %rax
+; CHECK-NEXT: mulq %rsi
+; CHECK-NEXT: addq %rax, (%r8)
+; CHECK-NEXT: adcq %rdx, 8(%r8)
+; CHECK-NEXT: ## %bb.1: ## %for.check
+; CHECK-NEXT: ## in Loop: Header=BB1_2 Depth=1
+; CHECK-NEXT: incq %r9
+; CHECK-NEXT: addq $16, %r8
+; CHECK-NEXT: cmpq %rcx, %r9
+; CHECK-NEXT: jl LBB1_2
+; CHECK-NEXT: ## %bb.3: ## %exit
+; CHECK-NEXT: retq
i64* dereferenceable(8) %x2,
i128* %y, i64 %count) nounwind {
entry:
@@ -63,6 +112,26 @@ exit:
}
define void @test_div_def(i32* dereferenceable(8) %x1,
+; CHECK-LABEL: test_div_def:
+; CHECK: ## %bb.0: ## %entry
+; CHECK-NEXT: movq %rdx, %r8
+; CHECK-NEXT: xorl %r9d, %r9d
+; CHECK-NEXT: movl (%rdi), %edi
+; CHECK-NEXT: movl (%rsi), %esi
+; CHECK-NEXT: .p2align 4, 0x90
+; CHECK-NEXT: LBB2_2: ## %for.body
+; CHECK-NEXT: ## =>This Inner Loop Header: Depth=1
+; CHECK-NEXT: movl %edi, %eax
+; CHECK-NEXT: xorl %edx, %edx
+; CHECK-NEXT: divl %esi
+; CHECK-NEXT: addl %eax, (%r8,%r9,4)
+; CHECK-NEXT: ## %bb.1: ## %for.check
+; CHECK-NEXT: ## in Loop: Header=BB2_2 Depth=1
+; CHECK-NEXT: incq %r9
+; CHECK-NEXT: cmpl %ecx, %r9d
+; CHECK-NEXT: jl LBB2_2
+; CHECK-NEXT: ## %bb.3: ## %exit
+; CHECK-NEXT: retq
i32* dereferenceable(8) %x2,
i32* %y, i32 %count) nounwind {
entry:
More information about the llvm-commits
mailing list