llvm.org GIT mirror llvm / 185d55e
Reduced test case for pr42279 in advance of the relevant re-commit + fix git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363601 91177308-0d34-0410-b5e6-96231b3b80d8 Philip Reames 3 months ago
1 changed file(s) with 31 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
598598 %sum.0.lcssa = phi float [ 0.000000e+00, %entry ], [ %add1.lcssa, %for.end.loopexit ]
599599 ret float %sum.0.lcssa
600600 }
601
602 define void @ptr_non_cmp_exit_test() {
603 ; CHECK-LABEL: @ptr_non_cmp_exit_test(
604 ; CHECK-NEXT: entry:
605 ; CHECK-NEXT: br label [[FOR_BODY29:%.*]]
606 ; CHECK: for.body29:
607 ; CHECK-NEXT: [[IV:%.*]] = phi i8* [ null, [[ENTRY:%.*]] ], [ [[IV_NEXT:%.*]], [[FOR_BODY29]] ]
608 ; CHECK-NEXT: [[TMP0:%.*]] = load volatile i8, i8* [[IV]], align 1
609 ; CHECK-NEXT: [[IV_NEXT]] = getelementptr inbounds i8, i8* [[IV]], i64 1
610 ; CHECK-NEXT: [[EXITCOND:%.*]] = icmp ne i8* [[IV_NEXT]], inttoptr (i64 11 to i8*)
611 ; CHECK-NEXT: br i1 [[EXITCOND]], label [[FOR_BODY29]], label [[EXIT:%.*]]
612 ; CHECK: exit:
613 ; CHECK-NEXT: ret void
614 ;
615 entry:
616 br label %for.body29
617
618 for.body29:
619 %iv = phi i8* [ null, %entry ], [ %iv.next, %for.body29 ]
620 load volatile i8, i8* %iv, align 1
621 %iv.next = getelementptr inbounds i8, i8* %iv, i64 1
622 %cmp = icmp ne i8* %iv.next, inttoptr (i64 11 to i8*)
623 %and = and i1 %cmp, %cmp
624 br i1 %and, label %for.body29, label %exit
625
626 exit:
627 ret void
628 }
629
630
631