1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4
2 ; RUN: opt < %s -passes=slp-vectorizer -S | FileCheck %s
4 target triple = "riscv64-unknown-linux-gnu"
6 define void @partial_vec_invalid_cost() #0 {
7 ; CHECK-LABEL: define void @partial_vec_invalid_cost(
8 ; CHECK-SAME: ) #[[ATTR0:[0-9]+]] {
10 ; CHECK-NEXT: [[TMP0:%.*]] = call i32 @llvm.vector.reduce.or.v4i32(<4 x i32> zeroinitializer)
11 ; CHECK-NEXT: [[TMP1:%.*]] = call i32 @llvm.vector.reduce.or.v4i32(<4 x i32> zeroinitializer)
12 ; CHECK-NEXT: [[OP_RDX3:%.*]] = or i32 [[TMP0]], [[TMP1]]
13 ; CHECK-NEXT: [[STORE_THIS:%.*]] = zext i32 [[OP_RDX3]] to i96
14 ; CHECK-NEXT: store i96 [[STORE_THIS]], ptr null, align 16
15 ; CHECK-NEXT: ret void
19 %lshr.1 = lshr i96 0, 0 ; These ops
20 %lshr.2 = lshr i96 0, 0 ; return an
21 %add.0 = add i96 0, 0 ; invalid
22 %add.1 = add i96 0, 0 ; vector cost.
24 %trunc.i96.1 = trunc i96 %lshr.1 to i32 ; These ops
25 %trunc.i96.2 = trunc i96 %lshr.2 to i32 ; return an
26 %trunc.i96.3 = trunc i96 %add.0 to i32 ; invalid
27 %trunc.i96.4 = trunc i96 %add.1 to i32 ; vector cost.
29 %or.0 = or i32 %trunc.i96.1, %trunc.i96.2
30 %or.1 = or i32 %or.0, %trunc.i96.3
31 %or.2 = or i32 %or.1, %trunc.i96.4
33 %zext.0 = zext i1 0 to i32 ; These
34 %zext.1 = zext i1 0 to i32 ; ops
35 %zext.2 = zext i1 0 to i32 ; are
36 %zext.3 = zext i1 0 to i32 ; vectorized
38 %or.3 = or i32 %or.2, %zext.0 ; users
39 %or.4 = or i32 %or.3, %zext.1 ; of
40 %or.5 = or i32 %or.4, %zext.2 ; vectorized
41 %or.6 = or i32 %or.5, %zext.3 ; ops
43 %store.this = zext i32 %or.6 to i96
45 store i96 %store.this, ptr null, align 16
49 attributes #0 = { "target-features"="+v" }