Heejin Ahn | 777d01c | 2019-01-03 23:10:11 +0000 | [diff] [blame] | 1 | ; RUN: llc < %s -asm-verbose=false -verify-machineinstrs -disable-block-placement -wasm-disable-explicit-locals -wasm-keep-registers | FileCheck %s |
| 2 | |
| 3 | target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128" |
| 4 | target triple = "wasm32-unknown-unknown" |
| 5 | |
| 6 | ; Test an interesting pattern of nested irreducibility. |
| 7 | ; Just check we resolve all the irreducibility here (if not we'd crash). |
| 8 | |
| 9 | ; CHECK-LABEL: func_2: |
| 10 | |
| 11 | ; Function Attrs: noinline nounwind optnone |
| 12 | define void @func_2() { |
| 13 | entry: |
| 14 | br i1 undef, label %lbl_937, label %if.else787 |
| 15 | |
| 16 | lbl_937: ; preds = %for.body978, %entry |
| 17 | br label %if.end965 |
| 18 | |
| 19 | if.else787: ; preds = %entry |
| 20 | br label %if.end965 |
| 21 | |
| 22 | if.end965: ; preds = %if.else787, %lbl_937 |
| 23 | br label %for.cond967 |
| 24 | |
| 25 | for.cond967: ; preds = %for.end1035, %if.end965 |
| 26 | br label %for.cond975 |
| 27 | |
| 28 | for.cond975: ; preds = %if.end984, %for.cond967 |
| 29 | br i1 undef, label %for.body978, label %for.end1035 |
| 30 | |
| 31 | for.body978: ; preds = %for.cond975 |
| 32 | br i1 undef, label %lbl_937, label %if.end984 |
| 33 | |
| 34 | if.end984: ; preds = %for.body978 |
| 35 | br label %for.cond975 |
| 36 | |
| 37 | for.end1035: ; preds = %for.cond975 |
| 38 | br label %for.cond967 |
| 39 | } |