[DAGCombiner] Add target hook function to decide folding (mul (add x, c1), c2)
[llvm-project.git] / llvm / test / Transforms / ADCE / broken-loop-info.ll
blob70ef12b611db60906199b4b3d11bafea81f8b857
1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -licm -adce -licm -S < %s | FileCheck %s
3 ; RUN: opt -passes='loop-mssa(licm),adce,loop-mssa(licm)' -S < %s | FileCheck %s
6 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128-ni:1-p2:32:8:8:32-ni:2"
7 target triple = "x86_64-unknown-linux-gnu"
9 define void @test() {
10 ; CHECK-LABEL: @test(
11 ; CHECK-NEXT:  bb:
12 ; CHECK-NEXT:    br label [[BB2:%.*]]
13 ; CHECK:       bb1:
14 ; CHECK-NEXT:    ret void
15 ; CHECK:       bb2:
16 ; CHECK-NEXT:    br label [[BB4:%.*]]
17 ; CHECK:       bb3:
18 ; CHECK-NEXT:    unreachable
19 ; CHECK:       bb4:
20 ; CHECK-NEXT:    br i1 true, label [[BB1:%.*]], label [[BB2]]
23 bb:
24   br label %bb2
26 bb1:                                              ; preds = %bb4
27   ret void
29 bb2:                                              ; preds = %bb4, %bb
30   br i1 undef, label %bb4, label %bb3
32 bb3:                                              ; preds = %bb2
33   br label %bb4
35 bb4:                                              ; preds = %bb3, %bb2
36   br i1 undef, label %bb1, label %bb2