1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=riscv32-- -mattr=+v | FileCheck -check-prefix=RV32I %s
3 ; RUN: llc < %s -mtriple=riscv64-- -mattr=+v | FileCheck -check-prefix=RV64I %s
5 define <8 x i16> @PR94265(<8 x i32> %a0) #0 {
6 ; RV32I-LABEL: PR94265:
8 ; RV32I-NEXT: vsetivli zero, 8, e32, m2, ta, ma
9 ; RV32I-NEXT: vsra.vi v10, v8, 31
10 ; RV32I-NEXT: vsrl.vi v10, v10, 26
11 ; RV32I-NEXT: vadd.vv v8, v8, v10
12 ; RV32I-NEXT: vsetvli zero, zero, e16, m1, ta, ma
13 ; RV32I-NEXT: vnsrl.wi v10, v8, 6
14 ; RV32I-NEXT: vsll.vi v8, v10, 10
17 ; RV64I-LABEL: PR94265:
19 ; RV64I-NEXT: vsetivli zero, 8, e32, m2, ta, ma
20 ; RV64I-NEXT: vsra.vi v10, v8, 31
21 ; RV64I-NEXT: vsrl.vi v10, v10, 26
22 ; RV64I-NEXT: vadd.vv v8, v8, v10
23 ; RV64I-NEXT: vsetvli zero, zero, e16, m1, ta, ma
24 ; RV64I-NEXT: vnsrl.wi v10, v8, 6
25 ; RV64I-NEXT: vsll.vi v8, v10, 10
27 %t1 = sdiv <8 x i32> %a0, <i32 64, i32 64, i32 64, i32 64, i32 64, i32 64, i32 64, i32 64>
28 %t2 = trunc <8 x i32> %t1 to <8 x i16>
29 %t3 = shl <8 x i16> %t2, <i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10>