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 ; Basic shift support is tested as part of ALU.ll. This file ensures that
6 ; shifts which may not be supported natively are lowered properly.
8 define i64 @lshr64(i64 %a, i64 %b) nounwind {
11 ; RV32I-NEXT: addi sp, sp, -16
12 ; RV32I-NEXT: sw ra, 12(sp)
13 ; RV32I-NEXT: call __lshrdi3
14 ; RV32I-NEXT: lw ra, 12(sp)
15 ; RV32I-NEXT: addi sp, sp, 16
21 define i64 @ashr64(i64 %a, i64 %b) nounwind {
22 ; RV32I-LABEL: ashr64:
24 ; RV32I-NEXT: addi sp, sp, -16
25 ; RV32I-NEXT: sw ra, 12(sp)
26 ; RV32I-NEXT: call __ashrdi3
27 ; RV32I-NEXT: lw ra, 12(sp)
28 ; RV32I-NEXT: addi sp, sp, 16
34 define i64 @shl64(i64 %a, i64 %b) nounwind {
37 ; RV32I-NEXT: addi sp, sp, -16
38 ; RV32I-NEXT: sw ra, 12(sp)
39 ; RV32I-NEXT: call __ashldi3
40 ; RV32I-NEXT: lw ra, 12(sp)
41 ; RV32I-NEXT: addi sp, sp, 16