summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2017-04-19 21:09:19 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2017-04-19 21:09:19 +0000
commit9a828c1f2b08462d4740c9ff4c78f54096804fc5 (patch)
tree6d0c7e89d5a435de70479d9ef3192fa924ea6a3e /llvm/test/Transforms
parent61e14d8dfed9f071961fdd3f0b2e8524c9a39b73 (diff)
downloadbcm5719-llvm-9a828c1f2b08462d4740c9ff4c78f54096804fc5.tar.gz
bcm5719-llvm-9a828c1f2b08462d4740c9ff4c78f54096804fc5.zip
[InstCombine] Add frem constant folding test (PR3316)
llvm-svn: 300757
Diffstat (limited to 'llvm/test/Transforms')
-rw-r--r--llvm/test/Transforms/InstCombine/constant-fold-math.ll9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstCombine/constant-fold-math.ll b/llvm/test/Transforms/InstCombine/constant-fold-math.ll
index 09263345e9b..27578387f82 100644
--- a/llvm/test/Transforms/InstCombine/constant-fold-math.ll
+++ b/llvm/test/Transforms/InstCombine/constant-fold-math.ll
@@ -54,4 +54,13 @@ define float @constant_fold_frem_f32() #0 {
ret float %x
}
+; PR3316
+
+; CHECK-LABEL: @constant_fold_frem_f64
+; CHECK-NEXT: ret double 0.000000e+00
+define double @constant_fold_frem_f64() {
+ %x = frem double 0x43E0000000000000, 1.000000e+00
+ ret double %x
+}
+
attributes #0 = { nounwind readnone }
OpenPOWER on IntegriCloud