Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[llvm-diff] Implement diff of PHI nodes
Implement diff of PHI nodes Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D114211
- Loading branch information
Showing
2 changed files
with
51 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
; RUN: rm -f %t.ll | ||
; RUN: cat %s | sed -e 's/ 0, %2 / 1, %2 /' > %t.ll | ||
; RUN: not llvm-diff %s %t.ll 2>&1 | FileCheck %s | ||
|
||
; CHECK: in function foo: | ||
; CHECK-NEXT: in block %6 / %6: | ||
; CHECK-NEXT: > %7 = phi i32 [ 1, %2 ], [ -1, %1 ] | ||
; CHECK-NEXT: > ret i32 %7 | ||
; CHECK-NEXT: < %7 = phi i32 [ 0, %2 ], [ -1, %1 ] | ||
; CHECK-NEXT: < ret i32 %7 | ||
define i32 @foo(i32 %0) #0 { | ||
callbr void asm sideeffect "", "X,~{dirflag},~{fpsr},~{flags}"(i8* blockaddress(@foo, %6)) | ||
to label %2 [label %6] | ||
|
||
2: | ||
%3 = icmp eq i32 %0, 0 | ||
br i1 %3, label %6, label %4 | ||
|
||
4: | ||
br label %5 | ||
|
||
5: | ||
br label %5 | ||
|
||
6: | ||
%7 = phi i32 [ 0, %2 ], [ -1, %1 ] | ||
ret i32 %7 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters