1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4
2 ; RUN: opt < %s -passes=newgvn -S | FileCheck %s
7 define ptr @cat(ptr %s1, i1 %arg, i1 %arg2, i1 %arg3, ...) nounwind {
8 ; CHECK-LABEL: define ptr @cat(
9 ; CHECK-SAME: ptr [[S1:%.*]], i1 [[ARG:%.*]], i1 [[ARG2:%.*]], i1 [[ARG3:%.*]], ...) #[[ATTR0:[0-9]+]] {
11 ; CHECK-NEXT: br i1 [[ARG2]], label [[BB:%.*]], label [[BB3:%.*]]
13 ; CHECK-NEXT: unreachable
15 ; CHECK-NEXT: store ptr undef, ptr undef, align 4
16 ; CHECK-NEXT: br i1 [[ARG3]], label [[BB5:%.*]], label [[BB6:%.*]]
18 ; CHECK-NEXT: unreachable
20 ; CHECK-NEXT: br label [[BB12:%.*]]
22 ; CHECK-NEXT: br i1 true, label [[BB9:%.*]], label [[BB10:%.*]]
24 ; CHECK-NEXT: br label [[BB11:%.*]]
26 ; CHECK-NEXT: store i8 poison, ptr null, align 1
27 ; CHECK-NEXT: br label [[BB11]]
29 ; CHECK-NEXT: br label [[BB12]]
31 ; CHECK-NEXT: br i1 [[ARG]], label [[BB8:%.*]], label [[BB13:%.*]]
33 ; CHECK-NEXT: ret ptr undef
36 br i1 %arg2, label %bb, label %bb3
42 store ptr undef, ptr undef, align 4
43 br i1 %arg3, label %bb5, label %bb6
52 br i1 %arg, label %bb9, label %bb10
55 %0 = load ptr, ptr undef, align 4 ; <ptr> [#uses=0]
56 %1 = load ptr, ptr undef, align 4 ; <ptr> [#uses=0]
62 bb11: ; preds = %bb10, %bb9
65 bb12: ; preds = %bb11, %bb6
66 br i1 %arg, label %bb8, label %bb13