1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -passes=simplifycfg -hoist-common-insts=true -S | FileCheck %s
3 ; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -hoist-common-insts=true -S | FileCheck %s
5 define void @foo(i1 %C, i32* %P) {
7 ; CHECK-NEXT: common.ret:
8 ; CHECK-NEXT: store i32 7, i32* [[P:%.*]], align 4
11 br i1 %C, label %T, label %F
20 define float @PR39535min(float %x) {
21 ; CHECK-LABEL: @PR39535min(
23 ; CHECK-NEXT: [[TOBOOL:%.*]] = fcmp une float [[X:%.*]], 0.000000e+00
24 ; CHECK-NEXT: [[DOTX:%.*]] = select fast i1 [[TOBOOL]], float 0.000000e+00, float [[X]]
25 ; CHECK-NEXT: ret float [[DOTX]]
28 %tobool = fcmp une float %x, 0.0
29 br i1 %tobool, label %cond.true, label %cond.false
38 %cond = phi fast float [ 0.0, %cond.true ], [ %x, %cond.false ]