1; RUN: opt < %s -reassociate -S | FileCheck %s
2
3define double @func(double %a, double %b) {
4; CHECK-LABEL: @func(
5; CHECK-NEXT:    [[TMP1:%.*]] = fmul fast double %b, %a
6; CHECK-NEXT:    [[TMP2:%.*]] = fmul fast double [[TMP1]], [[TMP1]]
7; CHECK-NEXT:    ret double [[TMP2]]
8;
9  %mul1 = fmul fast double %a, %a
10  %mul2 = fmul fast double %b, %b
11  %mul3 = fmul fast double %mul1, %mul2
12  ret double %mul3
13}
14