1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4
2 ; RUN: opt < %s -S -passes='loop-mssa(simple-loop-unswitch),instcombine' -verify-memoryssa | FileCheck %s
4 @.str9 = external constant [1 x i8]
6 declare i32 @strcmp(ptr, ptr)
8 define i32 @_ZN9Generator6strregEPKc(ptr %this, ptr %s) {
9 ; CHECK-LABEL: define i32 @_ZN9Generator6strregEPKc(
10 ; CHECK-SAME: ptr [[THIS:%.*]], ptr [[S:%.*]]) {
12 ; CHECK-NEXT: br label [[BB184:%.*]]
14 ; CHECK-NEXT: ret i32 0
16 ; CHECK-NEXT: br i1 poison, label [[BB154:%.*]], label [[BB128:%.*]]
18 ; CHECK-NEXT: br i1 poison, label [[BB250:%.*]], label [[BB166:%.*]]
20 ; CHECK-NEXT: br i1 false, label [[BB250]], label [[BB166]]
22 ; CHECK-NEXT: br label [[BB184]]
24 ; CHECK-NEXT: br i1 false, label [[BB88:%.*]], label [[BB55:%.*]]
26 ; CHECK-NEXT: ret i32 poison
29 %s_addr.0 = select i1 false, ptr @.str9, ptr %s
30 %tmp122 = icmp eq ptr %s_addr.0, null
37 br i1 %tmp122, label %bb154, label %bb128
40 %tmp138 = call i32 @strcmp( ptr null, ptr %s_addr.0 )
41 %iftmp.37.0.in4 = icmp eq i32 %tmp138, 0
42 br i1 %iftmp.37.0.in4, label %bb250, label %bb166
45 br i1 false, label %bb250, label %bb166
48 %tmp175 = add i32 %idx.0, 1
49 %tmp177 = add i32 %tmp175, 0
50 %tmp181 = add i32 %tmp177, 0
51 %tmp183 = add i32 %i33.0, 1
55 %i33.0 = phi i32 [ 0, %entry ], [ %tmp183, %bb166 ]
56 %idx.0 = phi i32 [ 0, %entry ], [ %tmp181, %bb166 ]
57 %tmp49 = icmp slt i32 %i33.0, 0
58 br i1 %tmp49, label %bb88, label %bb55