1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv32 -verify-machineinstrs < %s \
3 ; RUN: | FileCheck %s -check-prefix=RV32I
5 ; These IR sequences will generate ISD::ROTL and ISD::ROTR nodes, that the
6 ; RISC-V backend must be able to select
8 define i32 @rotl(i32 %x, i32 %y) nounwind {
11 ; RV32I-NEXT: addi a2, zero, 32
12 ; RV32I-NEXT: sub a2, a2, a1
13 ; RV32I-NEXT: sll a1, a0, a1
14 ; RV32I-NEXT: srl a0, a0, a2
15 ; RV32I-NEXT: or a0, a1, a0
24 define i32 @rotr(i32 %x, i32 %y) nounwind {
27 ; RV32I-NEXT: addi a2, zero, 32
28 ; RV32I-NEXT: sub a2, a2, a1
29 ; RV32I-NEXT: srl a1, a0, a1
30 ; RV32I-NEXT: sll a0, a0, a2
31 ; RV32I-NEXT: or a0, a1, a0