[llvm] [SLP]Do not require external uses for roots and single use for other instructions in computeMinimumValueSizes. (PR #72679)

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 10 07:46:19 PST 2024


================
@@ -4,9 +4,10 @@
 define void @t() {
 ; CHECK-LABEL: define void @t() {
 ; CHECK-NEXT:  entry:
-; CHECK-NEXT:    [[TMP0:%.*]] = or i32 0, 0
-; CHECK-NEXT:    [[TMP1:%.*]] = and i32 [[TMP0]], 65535
-; CHECK-NEXT:    store i32 [[TMP1]], ptr null, align 4
+; CHECK-NEXT:    [[TMP0:%.*]] = call i16 @llvm.vector.reduce.or.v4i16(<4 x i16> zeroinitializer)
+; CHECK-NEXT:    [[TMP1:%.*]] = zext i16 [[TMP0]] to i32
+; CHECK-NEXT:    [[TMP2:%.*]] = and i32 [[TMP1]], 65535
+; CHECK-NEXT:    store i32 [[TMP2]], ptr null, align 4
 ; CHECK-NEXT:    ret void
----------------
alexey-bataev wrote:

There are a few. I'll try to improve this one.

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


More information about the llvm-commits mailing list