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
4 ; RUN: llc -mtriple=riscv64 -verify-machineinstrs < %s \
5 ; RUN: | FileCheck %s -check-prefix=RV64I
7 define i32 @and_add_lsr(i32 %x, i32 %y) {
8 ; RV32I-LABEL: and_add_lsr:
10 ; RV32I-NEXT: addi a0, a0, -1
11 ; RV32I-NEXT: srli a1, a1, 20
12 ; RV32I-NEXT: and a0, a1, a0
15 ; RV64I-LABEL: and_add_lsr:
17 ; RV64I-NEXT: addiw a0, a0, -1
18 ; RV64I-NEXT: srliw a1, a1, 20
19 ; RV64I-NEXT: and a0, a1, a0