1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4
2 ; RUN: llc < %s -mtriple=riscv64 | FileCheck %s
4 define i8 @zext_nonneg_load_i16(ptr %x, ptr %y) {
5 ; CHECK-LABEL: zext_nonneg_load_i16:
7 ; CHECK-NEXT: lh a0, 0(a0)
8 ; CHECK-NEXT: bltz a0, .LBB0_2
9 ; CHECK-NEXT: # %bb.1: # %cont
10 ; CHECK-NEXT: add a0, a1, a0
11 ; CHECK-NEXT: lbu a0, 0(a0)
13 ; CHECK-NEXT: .LBB0_2: # %exit
14 ; CHECK-NEXT: li a0, 0
17 %b = icmp slt i16 %a, 0
18 br i1 %b, label %exit, label %cont
21 %c = zext nneg i16 %a to i64
22 %d = getelementptr i8, ptr %y, i64 %c