[llvm] [InstSimplify] Add basic simplifications for vp.reverse (PR #144112)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 14 01:54:20 PDT 2025


================
@@ -25,26 +23,23 @@ define <vscale x 4 x i32> @rev_of_rev_diffevl(<vscale x 4 x i32> %a, i32 %evl) {
 
 define <vscale x 4 x i32> @rev_of_poison(i32 %evl) {
 ; CHECK-LABEL: @rev_of_poison(
-; CHECK-NEXT:    [[REV:%.*]] = tail call <vscale x 4 x i32> @llvm.experimental.vp.reverse.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i1> splat (i1 true), i32 [[EVL:%.*]])
-; CHECK-NEXT:    ret <vscale x 4 x i32> [[REV]]
+; CHECK-NEXT:    ret <vscale x 4 x i32> poison
 ;
   %rev = tail call <vscale x 4 x i32> @llvm.experimental.vp.reverse(<vscale x 4 x i32> poison, <vscale x 4 x i1> splat (i1 true), i32 %evl)
   ret <vscale x 4 x i32> %rev
 }
 
 define <vscale x 4 x i32> @rev_of_undef(i32 %evl) {
----------------
dtcxzyw wrote:

We don't need undef tests. There are many PRs that drop undef tests...


https://github.com/llvm/llvm-project/pull/144112


More information about the llvm-commits mailing list