diff options
author | Nikita Popov <npopov@redhat.com> | 2024-04-19 13:59:19 +0900 |
---|---|---|
committer | Nikita Popov <npopov@redhat.com> | 2024-04-19 14:02:22 +0900 |
commit | ab1d988e1483895a71dcd257bdcaf6fdb0a83d62 (patch) | |
tree | f7a27e05fdbc59e0fe7e7b0a35ff863adfa2327c | |
parent | b64c69d5b1bfeaf675f25e7598b78e9f3543f241 (diff) | |
download | llvm-ab1d988e1483895a71dcd257bdcaf6fdb0a83d62.zip llvm-ab1d988e1483895a71dcd257bdcaf6fdb0a83d62.tar.gz llvm-ab1d988e1483895a71dcd257bdcaf6fdb0a83d62.tar.bz2 |
[InstCombine] Add test for incorrect fshr transform (#89338)
-rw-r--r-- | llvm/test/Transforms/InstCombine/fsh.ll | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstCombine/fsh.ll b/llvm/test/Transforms/InstCombine/fsh.ll index 6c85169..3bd44ec 100644 --- a/llvm/test/Transforms/InstCombine/fsh.ll +++ b/llvm/test/Transforms/InstCombine/fsh.ll @@ -1001,3 +1001,13 @@ define <2 x i32> @fsh_unary_shuffle_ops_partial_widening(<3 x i32> %x, <2 x i32> %r = call <2 x i32> @llvm.fshr.v2i32(<2 x i32> %a, <2 x i32> %b, <2 x i32> %c) ret <2 x i32> %r } + +; FIXME: This is a miscompile. +define <2 x i32> @fshr_vec_zero_elem(<2 x i32> %x, <2 x i32> %y) { +; CHECK-LABEL: @fshr_vec_zero_elem( +; CHECK-NEXT: [[FSH:%.*]] = call <2 x i32> @llvm.fshl.v2i32(<2 x i32> [[X:%.*]], <2 x i32> [[Y:%.*]], <2 x i32> <i32 30, i32 0>) +; CHECK-NEXT: ret <2 x i32> [[FSH]] +; + %fsh = call <2 x i32> @llvm.fshr.v2i32(<2 x i32> %x, <2 x i32> %y, <2 x i32> <i32 2, i32 0>) + ret <2 x i32> %fsh +} |