aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Analysis/ValueTrackingTest.cpp
diff options
context:
space:
mode:
authorjjasmine <jjasmine@igalia.com>2025-07-16 08:35:13 -0700
committerGitHub <noreply@github.com>2025-07-16 08:35:13 -0700
commit2206c7d4afc28d78c23db48de29d600ce1e8791b (patch)
treee2e99c6d590d848ef7e0edaa9f75793248dd371b /llvm/unittests/Analysis/ValueTrackingTest.cpp
parent33396d71e9aef624670380e11348a11b8ff74246 (diff)
downloadllvm-2206c7d4afc28d78c23db48de29d600ce1e8791b.zip
llvm-2206c7d4afc28d78c23db48de29d600ce1e8791b.tar.gz
llvm-2206c7d4afc28d78c23db48de29d600ce1e8791b.tar.bz2
[InstSimplify] Fold trig functions call of poison to poison (#148969)
Fold trig functions call of poison to poison. This includes sin, cos, asin, acos, atan, atan2, sinh, cosh, sincos, sincospi. Test cases are fixed and also added to llvm/test/Transforms/InstSimplify/fold-intrinsics.ll just like in https://github.com/llvm/llvm-project/pull/146750
Diffstat (limited to 'llvm/unittests/Analysis/ValueTrackingTest.cpp')
-rw-r--r--llvm/unittests/Analysis/ValueTrackingTest.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/unittests/Analysis/ValueTrackingTest.cpp b/llvm/unittests/Analysis/ValueTrackingTest.cpp
index 7a48105..4b47655 100644
--- a/llvm/unittests/Analysis/ValueTrackingTest.cpp
+++ b/llvm/unittests/Analysis/ValueTrackingTest.cpp
@@ -912,8 +912,8 @@ TEST(ValueTracking, propagatesPoison) {
{false, "call i32 @llvm.fshr.i32(i32 %x, i32 %y, i32 %shamt)", 2},
{true, "call float @llvm.sqrt.f32(float %fx)", 0},
{true, "call float @llvm.powi.f32.i32(float %fx, i32 %x)", 0},
- {false, "call float @llvm.sin.f32(float %fx)", 0},
- {false, "call float @llvm.cos.f32(float %fx)", 0},
+ {true, "call float @llvm.sin.f32(float %fx)", 0},
+ {true, "call float @llvm.cos.f32(float %fx)", 0},
{true, "call float @llvm.pow.f32(float %fx, float %fy)", 0},
{false, "call float @llvm.exp.f32(float %fx)", 0},
{false, "call float @llvm.exp2.f32(float %fx)", 0},