diff options
author | Adam Nemet <anemet@apple.com> | 2017-03-28 20:11:52 +0000 |
---|---|---|
committer | Adam Nemet <anemet@apple.com> | 2017-03-28 20:11:52 +0000 |
commit | cd847a8f3059d87cc6c5343d2dae7b25aacac322 (patch) | |
tree | f36fad6a6759edb3ee14c09c9defdf0e05be25c4 /llvm/test/Assembler | |
parent | 16af53a3955e8e8b93ccc1d4674e0e5613835961 (diff) | |
download | bcm5719-llvm-cd847a8f3059d87cc6c5343d2dae7b25aacac322.tar.gz bcm5719-llvm-cd847a8f3059d87cc6c5343d2dae7b25aacac322.zip |
[IR] Add AllowContract to FastMathFlags
-ffp-contract=fast does not currently work with LTO because it's passed as a
TargetOption to the backend rather than in the IR. This adds it to
FastMathFlags.
This is toward fixing PR25721
Differential Revision: https://reviews.llvm.org/D31164
llvm-svn: 298939
Diffstat (limited to 'llvm/test/Assembler')
-rw-r--r-- | llvm/test/Assembler/fast-math-flags.ll | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/test/Assembler/fast-math-flags.ll b/llvm/test/Assembler/fast-math-flags.ll index f0d3ecc761d..4ef3607e1d0 100644 --- a/llvm/test/Assembler/fast-math-flags.ll +++ b/llvm/test/Assembler/fast-math-flags.ll @@ -74,6 +74,18 @@ entry: ret float %e } +; CHECK: @contract( +define float @contract(float %x, float %y) { +entry: +; CHECK: %a = fsub contract float %x, %y + %a = fsub contract float %x, %y +; CHECK: %b = fadd contract float %x, %y + %b = fadd contract float %x, %y +; CHECK: %c = fmul contract float %a, %b + %c = fmul contract float %a, %b + ret float %c +} + ; CHECK: no_nan_inf define float @no_nan_inf(float %x, float %y) { entry: |