[llvm] 572e506 - [ValueTracking] add tests for propagatesPoison with FP ops; NFC

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 16 09:17:34 PDT 2021


Author: Sanjay Patel
Date: 2021-06-16T12:14:28-04:00
New Revision: 572e506b55f0ad181ddbb04d889651caa5a287e8

URL: https://github.com/llvm/llvm-project/commit/572e506b55f0ad181ddbb04d889651caa5a287e8
DIFF: https://github.com/llvm/llvm-project/commit/572e506b55f0ad181ddbb04d889651caa5a287e8.diff

LOG: [ValueTracking] add tests for propagatesPoison with FP ops; NFC

Verify that this matches the behavior in InstSimplify:
D104383 / ce95200b7942

We still need to add code/tests for FP intrinsics.

Added: 
    

Modified: 
    llvm/unittests/Analysis/ValueTrackingTest.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/unittests/Analysis/ValueTrackingTest.cpp b/llvm/unittests/Analysis/ValueTrackingTest.cpp
index 3c61f24ba452b..960044dba20bd 100644
--- a/llvm/unittests/Analysis/ValueTrackingTest.cpp
+++ b/llvm/unittests/Analysis/ValueTrackingTest.cpp
@@ -822,6 +822,12 @@ TEST(ValueTracking, propagatesPoison) {
       {true, "add nsw nuw i32 %x, %y"},
       {true, "ashr i32 %x, %y"},
       {true, "lshr exact i32 %x, 31"},
+      {true, "fadd float %fx, %fy"},
+      {true, "fsub float %fx, %fy"},
+      {true, "fmul float %fx, %fy"},
+      {true, "fdiv float %fx, %fy"},
+      {true, "frem float %fx, %fy"},
+      {true, "fneg float %fx"},
       {true, "fcmp oeq float %fx, %fy"},
       {true, "icmp eq i32 %x, %y"},
       {true, "getelementptr i8, i8* %p, i32 %x"},


        


More information about the llvm-commits mailing list