[PATCH] D99328: [SLP] Fix crash in reduction for integer min/max

Yevgeny Rouban via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 25 05:09:47 PDT 2021


yrouban added inline comments.


================
Comment at: llvm/test/Transforms/SLPVectorizer/slp-umax-rdx-crash.ll:12-25
+; CHECK-NEXT:    [[SMIN0:%.*]] = call i32 @llvm.smin.i32(i32 undef, i32 0)
+; CHECK-NEXT:    [[SMIN1:%.*]] = call i32 @llvm.smin.i32(i32 undef, i32 1)
+; CHECK-NEXT:    [[SMIN2:%.*]] = call i32 @llvm.smin.i32(i32 undef, i32 2)
+; CHECK-NEXT:    [[SMIN3:%.*]] = call i32 @llvm.smin.i32(i32 undef, i32 3)
+; CHECK-NEXT:    [[A:%.*]] = sub nsw i32 undef, [[SMIN0]]
+; CHECK-NEXT:    [[B:%.*]] = sub nsw i32 undef, [[SMIN1]]
+; CHECK-NEXT:    [[C:%.*]] = sub nsw i32 undef, [[SMIN2]]
----------------
the check are wrong - fixed


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D99328/new/

https://reviews.llvm.org/D99328



More information about the llvm-commits mailing list