summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/JumpThreading/PR37745.ll
blob: 82fc91911821a21578f135cdd02753a8c2569f4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
; RUN: opt -jump-threading -verify-each -S -mtriple=x86_64-- -o - %s

define void @foo() {
entry:
  br i1 false, label %A, label %B

A:
  %x = phi i32 [ undef, %entry ], [ %z, %B ]
  br label %B

B:
  %y = phi i32 [ undef, %entry ], [ %x, %A ]
  %z = add i32 %y, 1
  %cmp = icmp ne i32 %z, 0
  br i1 %cmp, label %exit, label %A

exit:
  ret void
}
OpenPOWER on IntegriCloud