1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv32 -verify-machineinstrs < %s \
3 ; RUN: | FileCheck -check-prefixes=RV32 %s
4 ; RUN: llc -mtriple=riscv64 -verify-machineinstrs < %s \
5 ; RUN: | FileCheck -check-prefixes=RV64 %s
7 define signext i16 @func(ptr %a, ptr %b) {
9 ; RV32: # %bb.0: # %entry
10 ; RV32-NEXT: lh a0, 0(a0)
11 ; RV32-NEXT: bltz a0, .LBB0_3
12 ; RV32-NEXT: # %bb.1: # %.LBB0_1
13 ; RV32-NEXT: beqz a1, .LBB0_3
14 ; RV32-NEXT: # %bb.2: # %.LBB0_2
16 ; RV32-NEXT: .LBB0_3: # %return
21 ; RV64: # %bb.0: # %entry
22 ; RV64-NEXT: lh a0, 0(a0)
23 ; RV64-NEXT: bltz a0, .LBB0_3
24 ; RV64-NEXT: # %bb.1: # %.LBB0_1
25 ; RV64-NEXT: beqz a1, .LBB0_3
26 ; RV64-NEXT: # %bb.2: # %.LBB0_2
28 ; RV64-NEXT: .LBB0_3: # %return
33 %cmp = icmp sgt i16 %0, -1
34 %tobool.not = icmp eq ptr %b, null
35 br i1 %cmp, label %.LBB0_1, label %return
38 br i1 %tobool.not, label %return, label %.LBB0_2