aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Analysis/ValueTrackingTest.cpp
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2023-12-21 15:16:55 +0100
committerNikita Popov <npopov@redhat.com>2023-12-21 15:21:23 +0100
commite414ba33b44971d47d24d75b7da94898d2cc8bde (patch)
treed5d30ba544b71a9c03ed64b4fdb8f65d9d2d4145 /llvm/unittests/Analysis/ValueTrackingTest.cpp
parent5992ce90b8c0fac06436c3c86621fbf6d5398ee5 (diff)
downloadllvm-e414ba33b44971d47d24d75b7da94898d2cc8bde.zip
llvm-e414ba33b44971d47d24d75b7da94898d2cc8bde.tar.gz
llvm-e414ba33b44971d47d24d75b7da94898d2cc8bde.tar.bz2
[ValueTracking] Shufflevector produces poison rather than undef
Shufflevector semantics have changed so that poison mask elements return poison rather than undef. Reflect this in the canCreateUndefOrPoison() implementation.
Diffstat (limited to 'llvm/unittests/Analysis/ValueTrackingTest.cpp')
-rw-r--r--llvm/unittests/Analysis/ValueTrackingTest.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/unittests/Analysis/ValueTrackingTest.cpp b/llvm/unittests/Analysis/ValueTrackingTest.cpp
index 0d3a594..27f6318 100644
--- a/llvm/unittests/Analysis/ValueTrackingTest.cpp
+++ b/llvm/unittests/Analysis/ValueTrackingTest.cpp
@@ -1177,12 +1177,12 @@ TEST(ValueTracking, canCreatePoisonOrUndef) {
{{false, false},
"shufflevector <4 x i32> %vx, <4 x i32> %vx2, "
"<4 x i32> <i32 0, i32 1, i32 2, i32 3>"},
- {{false, true},
+ {{true, false},
"shufflevector <4 x i32> %vx, <4 x i32> %vx2, "
- "<4 x i32> <i32 0, i32 1, i32 2, i32 undef>"},
- {{false, true},
+ "<4 x i32> <i32 0, i32 1, i32 2, i32 poison>"},
+ {{true, false},
"shufflevector <vscale x 4 x i32> %svx, "
- "<vscale x 4 x i32> %svx, <vscale x 4 x i32> undef"},
+ "<vscale x 4 x i32> %svx, <vscale x 4 x i32> poison"},
{{true, false}, "call i32 @g(i32 %x)"},
{{false, false}, "call noundef i32 @g(i32 %x)"},
{{true, false}, "fcmp nnan oeq float %fx, %fy"},