[InstCombine] Add frem constant folding test (PR3316)
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 19 Apr 2017 21:09:19 +0000 (21:09 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 19 Apr 2017 21:09:19 +0000 (21:09 +0000)
llvm-svn: 300757

llvm/test/Transforms/InstCombine/constant-fold-math.ll

index 0926334..2757838 100644 (file)
@@ -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 }