2019-08-02 07:30:32 +08:00
|
|
|
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
|
2019-04-17 12:52:47 +08:00
|
|
|
; RUN: opt < %s -reassociate -S | FileCheck %s
|
|
|
|
|
|
|
|
define double @func(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @func(
|
2019-08-02 07:30:32 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fmul fast double [[B:%.*]], [[A:%.*]]
|
2019-04-17 12:52:47 +08:00
|
|
|
; CHECK-NEXT: [[TMP2:%.*]] = fmul fast double [[TMP1]], [[TMP1]]
|
|
|
|
; CHECK-NEXT: ret double [[TMP2]]
|
|
|
|
;
|
|
|
|
%mul1 = fmul fast double %a, %a
|
|
|
|
%mul2 = fmul fast double %b, %b
|
|
|
|
%mul3 = fmul fast double %mul1, %mul2
|
|
|
|
ret double %mul3
|
|
|
|
}
|