1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py 2; RUN: opt < %s -passes=indvars -S | FileCheck %s 3 4declare void @foo(i64 noundef) 5 6; Function Attrs: mustprogress noreturn uwtable 7define void @pr59633(ptr noundef %ptr) { 8; CHECK-LABEL: @pr59633( 9; CHECK-NEXT: entry: 10; CHECK-NEXT: [[PTR1:%.*]] = ptrtoint ptr [[PTR:%.*]] to i64 11; CHECK-NEXT: [[TMP0:%.*]] = trunc i64 [[PTR1]] to i4 12; CHECK-NEXT: [[TMP1:%.*]] = zext i4 [[TMP0]] to i64 13; CHECK-NEXT: br label [[WHILE_BODY:%.*]] 14; CHECK: while.body: 15; CHECK-NEXT: tail call void @foo(i64 noundef [[TMP1]]) 16; CHECK-NEXT: br label [[WHILE_BODY]] 17; 18entry: 19 br label %while.body 20 21while.body: ; preds = %entry, %while.body 22 %ptr.addr.0 = phi ptr [ %ptr, %entry ], [ %add.ptr, %while.body ] 23 %0 = ptrtoint ptr %ptr.addr.0 to i64 24 %and = and i64 %0, 15 ; loop invariant 25 tail call void @foo(i64 noundef %and) 26 %add.ptr = getelementptr inbounds i8, ptr %ptr.addr.0, i64 16 27 br label %while.body 28} 29 30