1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -newgvn -enable-phi-of-ops=true -S | FileCheck %s
3 ;; Make sure we don't incorrectly use predicateinfo to simplify phi of ops cases
4 source_filename = "pr34135.ll"
6 define void @snork(i32 %arg) {
9 ; CHECK-NEXT: [[TMP:%.*]] = sext i32 [[ARG:%.*]] to i64
10 ; CHECK-NEXT: br label [[BB1:%.*]]
12 ; CHECK-NEXT: [[TMP2:%.*]] = phi i64 [ 0, [[BB:%.*]] ], [ [[TMP3:%.*]], [[BB1]] ]
13 ; CHECK-NEXT: [[TMP3]] = add i64 [[TMP2]], 1
14 ; CHECK-NEXT: [[TMP4:%.*]] = icmp slt i64 [[TMP3]], [[TMP]]
15 ; CHECK-NEXT: br i1 [[TMP4]], label [[BB1]], label [[BB7:%.*]]
17 ; CHECK-NEXT: [[TMP6:%.*]] = icmp sgt i64 [[TMP]], 1
18 ; CHECK-NEXT: br i1 [[TMP6]], label [[BB7]], label [[BB9:%.*]]
20 ; CHECK-NEXT: br label [[BB5:%.*]]
22 ; CHECK-NEXT: unreachable
25 %tmp = sext i32 %arg to i64
28 bb1: ; preds = %bb1, %bb
29 %tmp2 = phi i64 [ 0, %bb ], [ %tmp3, %bb1 ]
30 %tmp3 = add i64 %tmp2, 1
31 %tmp4 = icmp slt i64 %tmp3, %tmp
32 br i1 %tmp4, label %bb1, label %bb7
35 %tmp6 = icmp sgt i64 %tmp8, 1
36 br i1 %tmp6, label %bb7, label %bb9
38 bb7: ; preds = %bb5, %bb1
39 %tmp8 = phi i64 [ undef, %bb5 ], [ %tmp, %bb1 ]