[llvm] 35e8cc4 - [InstSimplify][test] add tests for poison propagation through FP calls; NFC

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 6 11:07:15 PDT 2021


Author: Sanjay Patel
Date: 2021-07-06T14:06:50-04:00
New Revision: 35e8cc4979eaa61377c323fc8ff17dd7d09e1f20

URL: https://github.com/llvm/llvm-project/commit/35e8cc4979eaa61377c323fc8ff17dd7d09e1f20
DIFF: https://github.com/llvm/llvm-project/commit/35e8cc4979eaa61377c323fc8ff17dd7d09e1f20.diff

LOG: [InstSimplify][test] add tests for poison propagation through FP calls; NFC

Added: 
    

Modified: 
    llvm/test/Transforms/InstSimplify/call.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/Transforms/InstSimplify/call.ll b/llvm/test/Transforms/InstSimplify/call.ll
index db3a336c1351c..ac7637a61db10 100644
--- a/llvm/test/Transforms/InstSimplify/call.ll
+++ b/llvm/test/Transforms/InstSimplify/call.ll
@@ -1009,6 +1009,22 @@ define double @fma_poison_op2(double %x, double %y) {
   ret double %r
 }
 
+define double @fma_undef_op0_poison_op1(double %x) {
+; CHECK-LABEL: @fma_undef_op0_poison_op1(
+; CHECK-NEXT:    ret double 0x7FF8000000000000
+;
+  %r = call double @llvm.fma.f64(double undef, double poison, double %x)
+  ret double %r
+}
+
+define double @fma_undef_op0_poison_op2(double %x) {
+; CHECK-LABEL: @fma_undef_op0_poison_op2(
+; CHECK-NEXT:    ret double 0x7FF8000000000000
+;
+  %r = call double @llvm.fma.f64(double undef, double %x, double poison)
+  ret double %r
+}
+
 define double @fmuladd_undef_op0(double %x, double %y) {
 ; CHECK-LABEL: @fmuladd_undef_op0(
 ; CHECK-NEXT:    ret double 0x7FF8000000000000
@@ -1057,6 +1073,22 @@ define double @fmuladd_poison_op2(double %x, double %y) {
   ret double %r
 }
 
+define double @fmuladd_nan_op0_poison_op1(double %x) {
+; CHECK-LABEL: @fmuladd_nan_op0_poison_op1(
+; CHECK-NEXT:    ret double 0x7FF8000000000000
+;
+  %r = call double @llvm.fmuladd.f64(double 0x7ff8000000000000, double poison, double %x)
+  ret double %r
+}
+
+define double @fmuladd_nan_op1_poison_op2(double %x) {
+; CHECK-LABEL: @fmuladd_nan_op1_poison_op2(
+; CHECK-NEXT:    ret double 0x7FF8000000000000
+;
+  %r = call double @llvm.fmuladd.f64(double %x, double 0x7ff8000000000000, double poison)
+  ret double %r
+}
+
 define double @fma_nan_op0(double %x, double %y) {
 ; CHECK-LABEL: @fma_nan_op0(
 ; CHECK-NEXT:    ret double 0x7FF8000000000000


        


More information about the llvm-commits mailing list