diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 10:51:19 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 10:51:19 +0000 |
commit | eb11fae6d08f479c0799db45860a98af528fa6e7 (patch) | |
tree | 44d492a50c8c1a7eb8e2d17ea3360ec4d066f042 /test/CodeGen/X86/x86-shrink-wrapping.ll | |
parent | b8a2042aa938069e862750553db0e4d82d25822c (diff) | |
download | src-eb11fae6d08f479c0799db45860a98af528fa6e7.tar.gz src-eb11fae6d08f479c0799db45860a98af528fa6e7.zip |
Vendor import of llvm trunk r338150:vendor/llvm/llvm-trunk-r338150
Notes
Notes:
svn path=/vendor/llvm/dist/; revision=336809
svn path=/vendor/llvm/llvm-trunk-r338150/; revision=336814; tag=vendor/llvm/llvm-trunk-r338150
Diffstat (limited to 'test/CodeGen/X86/x86-shrink-wrapping.ll')
-rw-r--r-- | test/CodeGen/X86/x86-shrink-wrapping.ll | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/test/CodeGen/X86/x86-shrink-wrapping.ll b/test/CodeGen/X86/x86-shrink-wrapping.ll index 9d856c6442bb..eecc7fdd1381 100644 --- a/test/CodeGen/X86/x86-shrink-wrapping.ll +++ b/test/CodeGen/X86/x86-shrink-wrapping.ll @@ -1,4 +1,5 @@ -; RUN: llc %s -o - -enable-shrink-wrap=true | FileCheck %s --check-prefix=CHECK --check-prefix=ENABLE +; RUN: llc %s -o - -enable-shrink-wrap=true -pass-remarks-output=%t | FileCheck %s --check-prefix=CHECK --check-prefix=ENABLE +; RUN: cat %t | FileCheck %s --check-prefix=REMARKS ; RUN: llc %s -o - -enable-shrink-wrap=false | FileCheck %s --check-prefix=CHECK --check-prefix=DISABLE ; ; Note: Lots of tests use inline asm instead of regular calls. @@ -17,7 +18,7 @@ target triple = "x86_64-apple-macosx" ; Compare the arguments and jump to exit. ; No prologue needed. ; ENABLE: movl %edi, [[ARG0CPY:%e[a-z]+]] -; ENABLE-NEXT: cmpl %esi, [[ARG0CPY]] +; ENABLE-NEXT: cmpl %esi, %edi ; ENABLE-NEXT: jge [[EXIT_LABEL:LBB[0-9_]+]] ; ; Prologue code. @@ -27,7 +28,7 @@ target triple = "x86_64-apple-macosx" ; Compare the arguments and jump to exit. ; After the prologue is set. ; DISABLE: movl %edi, [[ARG0CPY:%e[a-z]+]] -; DISABLE-NEXT: cmpl %esi, [[ARG0CPY]] +; DISABLE-NEXT: cmpl %esi, %edi ; DISABLE-NEXT: jge [[EXIT_LABEL:LBB[0-9_]+]] ; ; Store %a in the alloca. @@ -314,7 +315,7 @@ if.end: ; preds = %if.else, %for.end ; ENABLE: addl %esi, %esi ; ENABLE-NEXT: movl %esi, %eax ; ENABLE-NEXT: retq -define i32 @loopInfoRestoreOutsideLoop(i32 %cond, i32 %N) #0 { +define i32 @loopInfoRestoreOutsideLoop(i32 %cond, i32 %N) nounwind { entry: %tobool = icmp eq i32 %cond, 0 br i1 %tobool, label %if.else, label %if.then @@ -808,10 +809,9 @@ end: ; DISABLE-NEXT: subq $16, %rsp ; ; Load the value of b. -; CHECK: movb _b(%rip), [[BOOL:%cl]] ; Create the zero value for the select assignment. -; CHECK-NEXT: xorl [[CMOVE_VAL:%eax]], [[CMOVE_VAL]] -; CHECK-NEXT: testb [[BOOL]], [[BOOL]] +; CHECK: xorl [[CMOVE_VAL:%eax]], [[CMOVE_VAL]] +; CHECK-NEXT: cmpb $0, _b(%rip) ; CHECK-NEXT: jne [[STOREC_LABEL:LBB[0-9_]+]] ; ; CHECK: movb $48, [[CMOVE_VAL:%al]] @@ -941,6 +941,13 @@ attributes #3 = { nounwind } ; CHECK: popq ; CHECK-NEXT: popq ; CHECK-NEXT: retq +; Make sure we emit missed optimization remarks for this. +; REMARKS: Pass: shrink-wrap +; REMARKS-NEXT: Name: UnsupportedIrreducibleCFG +; REMARKS-NEXT: Function: irreducibleCFG +; REMARKS-NEXT: Args: +; REMARKS-NEXT: - String: Irreducible CFGs are not supported yet + define i32 @irreducibleCFG() #4 { entry: %i0 = load i32, i32* @irreducibleCFGa, align 4 |