Skip to content

Commit

Permalink
[InstCombine] add FMF to better show current fdiv fold behavior; NFC
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@325365 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
rotateright committed Feb 16, 2018
1 parent d23fadd commit e7f780c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/Transforms/InstCombine/fdiv.ll
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,11 @@ define <2 x float> @not_exact_inverse_vec(<2 x float> %x) {

define float @div_with_div_numerator(float %x, float %y, float %z) {
; CHECK-LABEL: @div_with_div_numerator(
; CHECK-NEXT: [[TMP1:%.*]] = fmul float [[Y:%.*]], [[Z:%.*]]
; CHECK-NEXT: [[TMP1:%.*]] = fmul ninf float [[Y:%.*]], [[Z:%.*]]
; CHECK-NEXT: [[DIV2:%.*]] = fdiv fast float [[X:%.*]], [[TMP1]]
; CHECK-NEXT: ret float [[DIV2]]
;
%div1 = fdiv float %x, %y
%div1 = fdiv ninf float %x, %y
%div2 = fdiv fast float %div1, %z
ret float %div2
}
Expand All @@ -132,11 +132,11 @@ define float @div_with_div_numerator(float %x, float %y, float %z) {

define <2 x float> @div_with_div_denominator(<2 x float> %x, <2 x float> %y, <2 x float> %z) {
; CHECK-LABEL: @div_with_div_denominator(
; CHECK-NEXT: [[TMP1:%.*]] = fmul <2 x float> [[Z:%.*]], [[Y:%.*]]
; CHECK-NEXT: [[TMP1:%.*]] = fmul nnan <2 x float> [[Y:%.*]], [[Z:%.*]]
; CHECK-NEXT: [[DIV2:%.*]] = fdiv fast <2 x float> [[TMP1]], [[X:%.*]]
; CHECK-NEXT: ret <2 x float> [[DIV2]]
;
%div1 = fdiv <2 x float> %x, %y
%div1 = fdiv nnan <2 x float> %x, %y
%div2 = fdiv fast <2 x float> %z, %div1
ret <2 x float> %div2
}
Expand Down

0 comments on commit e7f780c

Please sign in to comment.