22 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc -mtriple=riscv32 -verify-machineinstrs < %s \3; RUN: | FileCheck -check-prefix=RV32I %s4; RUN: llc -mtriple=riscv64 -verify-machineinstrs < %s \5; RUN: | FileCheck -check-prefix=RV64I %s6 7define i24 @aext(i32 %0) {8; RV32I-LABEL: aext:9; RV32I: # %bb.0:10; RV32I-NEXT: srli a0, a0, 811; RV32I-NEXT: ret12;13; RV64I-LABEL: aext:14; RV64I: # %bb.0:15; RV64I-NEXT: srliw a0, a0, 816; RV64I-NEXT: ret17 %2 = and i32 %0, -25618 %3 = lshr exact i32 %2, 819 %4 = trunc i32 %3 to i2420 ret i24 %421}22