1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=riscv64 -mattr=+v | FileCheck %s
4 declare i64 @llvm.riscv.vsetvli(
7 define signext i32 @vsetvl_sext() {
8 ; CHECK-LABEL: vsetvl_sext:
10 ; CHECK-NEXT: vsetivli a0, 1, e16, m2, ta, ma
12 %a = call i64 @llvm.riscv.vsetvli(i64 1, i64 1, i64 1)
13 %b = trunc i64 %a to i32
17 define zeroext i32 @vsetvl_zext() {
18 ; CHECK-LABEL: vsetvl_zext:
20 ; CHECK-NEXT: vsetivli a0, 1, e16, m2, ta, ma
22 %a = call i64 @llvm.riscv.vsetvli(i64 1, i64 1, i64 1)
23 %b = trunc i64 %a to i32
27 define i64 @vsetvl_and17bits() {
28 ; CHECK-LABEL: vsetvl_and17bits:
30 ; CHECK-NEXT: vsetivli a0, 1, e16, m2, ta, ma
32 %a = call i64 @llvm.riscv.vsetvli(i64 1, i64 1, i64 1)
33 %b = and i64 %a, 131071