1; RUN: opt < %s -reassociate -S | FileCheck %s
2
3; This test is to make sure while processing a block, uses of instructions
4; from a different basic block don't get added to be re-optimized
5
6define  void @main() {
7; CHECK-LABEL: @main(
8; CHECK-NEXT:  entry:
9; CHECK-NEXT:    br i1 undef, label %bb1, label %bb2
10; CHECK:       bb1:
11; CHECK-NEXT:    ret void
12; CHECK:       bb2:
13; CHECK-NEXT:    ret void
14;
15entry:
16  %0 = fadd fast float undef, undef
17  br i1 undef, label %bb1, label %bb2
18
19bb1:
20  %1 = fmul fast float undef, -2.000000e+00
21  %2 = fmul fast float %1, 2.000000e+00
22  %3 = fadd fast float %2, 2.000000e+00
23  %4 = fadd fast float %3, %0
24  %mul351 = fmul fast float %4, 5.000000e-01
25  ret void
26
27bb2:
28  ret void
29}
30
31