1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -dse -S %s | FileCheck %s
4 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
6 ; Make sure we do not crash when we encounter unreachable blocks while checking
7 ; if all paths to DomAccess go through a killing block.
8 define void @test(float* %ptr, i1 %c.1, i1 %c.2, i1 %c.3) {
11 ; CHECK-NEXT: br i1 [[C_1:%.*]], label [[BB27:%.*]], label [[BB53:%.*]]
13 ; CHECK-NEXT: br label [[BB43:%.*]]
15 ; CHECK-NEXT: br i1 [[C_2:%.*]], label [[BB22:%.*]], label [[BB53]]
17 ; CHECK-NEXT: br i1 [[C_3:%.*]], label [[BB38:%.*]], label [[BB39:%.*]]
19 ; CHECK-NEXT: store float 0.000000e+00, float* [[PTR:%.*]], align 4
20 ; CHECK-NEXT: br label [[BB38]]
22 ; CHECK-NEXT: br i1 [[C_2]], label [[BB43]], label [[BB38]]
24 ; CHECK-NEXT: store float 0.000000e+00, float* [[PTR]], align 4
25 ; CHECK-NEXT: br label [[BB50:%.*]]
27 ; CHECK-NEXT: br i1 [[C_3]], label [[BB27]], label [[BB53]]
29 ; CHECK-NEXT: br label [[BB53]]
32 br i1 %c.1, label %bb27, label %bb53
34 bb10: ; No predecessors!
38 br i1 %c.2, label %bb22, label %bb53
40 bb27: ; preds = %bb50, %bb
41 br i1 %c.3, label %bb38, label %bb39
43 bb38: ; preds = %bb39, %bb38, %bb27
44 store float 0.000000e+00, float* %ptr, align 4
48 br i1 %c.2, label %bb43, label %bb38
50 bb43: ; preds = %bb39, %bb10
51 store float 0.000000e+00, float* %ptr, align 4
55 br i1 %c.3, label %bb27, label %bb53
57 bb53: ; preds = %bb53, %bb50, %bb22, %bb