[llvm-branch-commits] [llvm-branch] r278874 - Merging r278841:

Hans Wennborg via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Aug 16 17:15:15 PDT 2016


Author: hans
Date: Tue Aug 16 19:15:15 2016
New Revision: 278874

URL: http://llvm.org/viewvc/llvm-project?rev=278874&view=rev
Log:
Merging r278841:
------------------------------------------------------------------------
r278841 | haicheng | 2016-08-16 13:06:25 -0700 (Tue, 16 Aug 2016) | 3 lines

[BranchFolding] Change a test case of r278575.

Rename the operands to make the test less brittle.
------------------------------------------------------------------------

Modified:
    llvm/branches/release_39/   (props changed)
    llvm/branches/release_39/test/CodeGen/X86/tail-merge-after-mbp.ll

Propchange: llvm/branches/release_39/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Aug 16 19:15:15 2016
@@ -1,3 +1,3 @@
 /llvm/branches/Apple/Pertwee:110850,110961
 /llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,275868-275870,275879,275898,275928,275935,275946,275978,275981,276015,276051,276077,276109,276119,276181,276209,276236-276237,276358,276364,276368,276389,276435,276438,276479,276510,276648,276676,276712,276740,276823,276956,276980,277093,277114,277135,277371,277399,277500,277504,277625,277691,277693,277773,278002,278086,278133,278157,278370,278413,278558,278569,278571,278573,278575,278584
+/llvm/trunk:155241,275868-275870,275879,275898,275928,275935,275946,275978,275981,276015,276051,276077,276109,276119,276181,276209,276236-276237,276358,276364,276368,276389,276435,276438,276479,276510,276648,276676,276712,276740,276823,276956,276980,277093,277114,277135,277371,277399,277500,277504,277625,277691,277693,277773,278002,278086,278133,278157,278370,278413,278558,278569,278571,278573,278575,278584,278841

Modified: llvm/branches/release_39/test/CodeGen/X86/tail-merge-after-mbp.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_39/test/CodeGen/X86/tail-merge-after-mbp.ll?rev=278874&r1=278873&r2=278874&view=diff
==============================================================================
--- llvm/branches/release_39/test/CodeGen/X86/tail-merge-after-mbp.ll (original)
+++ llvm/branches/release_39/test/CodeGen/X86/tail-merge-after-mbp.ll Tue Aug 16 19:15:15 2016
@@ -9,82 +9,86 @@
 declare i32 @Up(...) 
 declare i32 @f(i32, i32) 
 
+; check loop block_14 is not merged with block_21
+; check loop block_11 is not merged with block_18, block_25
 define i32 @foo(%0* nocapture readonly, i32, i1 %c, i8* %p1, %2** %p2) {
 ; CHECK-LABEL: foo:
-; CHECK:     BB#6:
+; CHECK:     # %block_11
 ; CHECK-NEXT:        movq    (%r14), %rax
 ; CHECK-NEXT:        testq   %rax, %rax
 ; CHECK-NEXT:        je      
-; CHECK-NEXT:# BB#7:
+; CHECK-NEXT:# %block_14
 ; CHECK-NEXT:        cmpq    $0, 8(%rax)
 ; CHECK-NEXT:        jne    
-; CHECK-NEXT:# BB#8:
+; CHECK-NEXT:# %block_18
 ; CHECK-NEXT:        movq    (%r14), %rax
 ; CHECK-NEXT:        testq   %rax, %rax
 ; CHECK-NEXT:        je    
-; CHECK-NEXT:LBB0_9:
+; CHECK-NEXT:# %block_21
+; CHECK-NEXT:# =>This Inner Loop Header
 ; CHECK-NEXT:        cmpq    $0, 8(%rax)
 ; CHECK-NEXT:        jne  
-; CHECK-NEXT:# BB#10:
+; CHECK-NEXT:# %block_25
+; CHECK-NEXT:#   in Loop
 ; CHECK-NEXT:        movq    (%r14), %rax
 ; CHECK-NEXT:        testq   %rax, %rax
 ; CHECK-NEXT:        jne 
-  br i1 %c, label %34, label %3
+  br i1 %c, label %block_34, label %block_3
 
-; <label>:3:                                      ; preds = %2
-  br i1 %c, label %7, label %4
+block_3:                                      ; preds = %2
+  br i1 %c, label %block_7, label %block_4
 
-; <label>:4:                                      ; preds = %3
-  %5 = tail call i32 @f(i32 undef, i32 undef)
-  %6 = icmp eq i32 %5, 0
-  br i1 %6, label %7, label %34
-
-; <label>:7:                                      ; preds = %4, %3
-  %8 = icmp eq %2* null, null
-  br i1 %8, label %34, label %9
-
-; <label>:9:                                      ; preds = %7
-  %10 = icmp eq i8* %p1, null
-  br i1 %10, label %11, label %32
-
-; <label>:11:                                     ; preds = %9
-  %12 = load %2*, %2** %p2, align 8
-  %13 = icmp eq %2* %12, null
-  br i1 %13, label %34, label %14
-
-; <label>:14:                                     ; preds = %11
-  %15 = getelementptr inbounds %2, %2* %12, i64 0, i32 1
-  %16 = load i8*, i8** %15, align 8
-  %17 = icmp eq i8* %16, null
-  br i1 %17, label %18, label %32
-
-; <label>:18:                                     ; preds = %14
-  %19 = load %2*, %2** %p2, align 8
-  %20 = icmp eq %2* %19, null
-  br i1 %20, label %34, label %21
-
-; <label>:21:                                     ; preds = %18
-  %22 = getelementptr inbounds %2, %2* %19, i64 0, i32 1
-  %23 = load i8*, i8** %22, align 8
-  %24 = icmp eq i8* %23, null
-  br i1 %24, label %25, label %32
-
-; <label>:25:                                     ; preds = %28, %21
-  %26 = load %2*, %2** %p2, align 8
-  %27 = icmp eq %2* %26, null
-  br i1 %27, label %34, label %28
-
-; <label>:28:                                     ; preds = %25
-  %29 = getelementptr inbounds %2, %2* %26, i64 0, i32 1
-  %30 = load i8*, i8** %29, align 8
-  %31 = icmp eq i8* %30, null
-  br i1 %31, label %25, label %32
-
-; <label>:32:                                     ; preds = %28, %21, %14, %9
-  %33 = tail call i32 (...) @Up()
-  br label %34
-
-; <label>:34:                                     ; preds = %32, %25, %18, %11, %7, %4, %2
-  %35 = phi i32 [ 0, %2 ], [ %5, %4 ], [ 0, %7 ], [ 0, %11 ], [ 0, %32 ], [ 0, %18 ], [ 0, %25 ]
-  ret i32 %35
+block_4:                                      ; preds = %block_3
+  %a5 = tail call i32 @f(i32 undef, i32 undef)
+  %a6 = icmp eq i32 %a5, 0
+  br i1 %a6, label %block_7, label %block_34
+
+block_7:                                      ; preds = %block_4, %block_3
+  %a8 = icmp eq %2* null, null
+  br i1 %a8, label %block_34, label %block_9
+
+block_9:                                      ; preds = %block_7
+  %a10 = icmp eq i8* %p1, null
+  br i1 %a10, label %block_11, label %block_32
+
+block_11:                                     ; preds = %block_9
+  %a12 = load %2*, %2** %p2, align 8
+  %a13 = icmp eq %2* %a12, null
+  br i1 %a13, label %block_34, label %block_14
+
+block_14:                                     ; preds = %block_11
+  %a15 = getelementptr inbounds %2, %2* %a12, i64 0, i32 1
+  %a16 = load i8*, i8** %a15, align 8
+  %a17 = icmp eq i8* %a16, null
+  br i1 %a17, label %block_18, label %block_32
+
+block_18:                                     ; preds = %block_14
+  %a19 = load %2*, %2** %p2, align 8
+  %a20 = icmp eq %2* %a19, null
+  br i1 %a20, label %block_34, label %block_21
+
+block_21:                                     ; preds = %block_18
+  %a22 = getelementptr inbounds %2, %2* %a19, i64 0, i32 1
+  %a23 = load i8*, i8** %a22, align 8
+  %a24 = icmp eq i8* %a23, null
+  br i1 %a24, label %block_25, label %block_32
+
+block_25:                                     ; preds = %block_28, %block_21
+  %a26 = load %2*, %2** %p2, align 8
+  %a27 = icmp eq %2* %a26, null
+  br i1 %a27, label %block_34, label %block_28
+
+block_28:                                     ; preds = %block_25
+  %a29 = getelementptr inbounds %2, %2* %a26, i64 0, i32 1
+  %a30 = load i8*, i8** %a29, align 8
+  %a31 = icmp eq i8* %a30, null
+  br i1 %a31, label %block_25, label %block_32
+
+block_32:                                     ; preds = %block_28, %block_21, %block_14, %block_9
+  %a33 = tail call i32 (...) @Up()
+  br label %block_34
+
+block_34:                                     ; preds = %block_32, %block_25, %block_18, %block_11, %block_7, %block_4, %2
+  %a35 = phi i32 [ 0, %2 ], [ %a5, %block_4 ], [ 0, %block_7 ], [ 0, %block_11 ], [ 0, %block_32 ], [ 0, %block_18 ], [ 0, %block_25 ]
+  ret i32 %a35
 }




More information about the llvm-branch-commits mailing list