[PATCH] D14071: [FPEnv Core 06/14] Do not fold constants on reading in IR asm/bitcode

Sergey Dmitrouk via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 4 12:06:47 PST 2015


sdmitrouk updated this revision to Diff 41914.
sdmitrouk added a comment.

This got reduced to just a test case (maybe worth squashing into other revision, but this would break numbering, so still here).


Repository:
  rL LLVM

http://reviews.llvm.org/D14071

Files:
  test/Assembler/do-not-fold-fp-consts.ll

Index: test/Assembler/do-not-fold-fp-consts.ll
===================================================================
--- /dev/null
+++ test/Assembler/do-not-fold-fp-consts.ll
@@ -0,0 +1,36 @@
+; RUN: llvm-as < %s | llvm-dis | FileCheck %s
+
+define double @do-not-fold-fadd() {
+; CHECK-LABEL: @do-not-fold-fadd
+; CHECK: fadd
+entry:
+  ret double fadd (double 1.000000e+308, double 1.000000e+308)
+}
+
+define double @do-not-fold-fsub() {
+; CHECK-LABEL: @do-not-fold-fsub
+; CHECK: fsub
+entry:
+  ret double fsub (double 1.000000e-308, double 1.000000e+308)
+}
+
+define double @do-not-fold-fmul() {
+; CHECK-LABEL: @do-not-fold-fmul
+; CHECK: fmul
+entry:
+  ret double fmul (double 1.000000e+300, double 1.000000e+300)
+}
+
+define double @do-not-fold-fdiv() {
+; CHECK-LABEL: @do-not-fold-fdiv
+; CHECK: fdiv
+entry:
+  ret double fdiv (double 1.000000e+300, double 1.000000e-300)
+}
+
+define double @do-not-fold-frem() {
+; CHECK-LABEL: @do-not-fold-frem
+; CHECK: frem
+entry:
+  ret double frem (double 1.000000e+300, double 1.000000e-300)
+}


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14071.41914.patch
Type: text/x-patch
Size: 1052 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151204/c9e640dd/attachment.bin>


More information about the llvm-commits mailing list