aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Analysis/ValueTrackingTest.cpp
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2021-06-16 12:12:19 -0400
committerSanjay Patel <spatel@rotateright.com>2021-06-16 12:14:28 -0400
commit572e506b55f0ad181ddbb04d889651caa5a287e8 (patch)
tree36e3625436e762d0842c61b00a065aa529d2f806 /llvm/unittests/Analysis/ValueTrackingTest.cpp
parent35a085bfabef2e5696286b5ca55da962ffd6c4e4 (diff)
downloadllvm-572e506b55f0ad181ddbb04d889651caa5a287e8.zip
llvm-572e506b55f0ad181ddbb04d889651caa5a287e8.tar.gz
llvm-572e506b55f0ad181ddbb04d889651caa5a287e8.tar.bz2
[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.
Diffstat (limited to 'llvm/unittests/Analysis/ValueTrackingTest.cpp')
-rw-r--r--llvm/unittests/Analysis/ValueTrackingTest.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/unittests/Analysis/ValueTrackingTest.cpp b/llvm/unittests/Analysis/ValueTrackingTest.cpp
index 3c61f24..960044d 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"},