1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=riscv64 | FileCheck %s
4 ; Make sure we use lwu for the load, and don't emit
5 ; a sext.w for the compare. This requires isTruncateFree
6 ; to return true for i64->i32. Otherwise we emit a
7 ; lw and a shift pair for the zext.
9 define void @foo(ptr %p, ptr %q, ptr %r) {
12 ; CHECK-NEXT: lwu a0, 0(a0)
13 ; CHECK-NEXT: sd a0, 0(a1)
14 ; CHECK-NEXT: beqz a0, .LBB0_2
15 ; CHECK-NEXT: # %bb.1: # %if
16 ; CHECK-NEXT: sw a0, 0(a2)
17 ; CHECK-NEXT: .LBB0_2: # %end
20 %b = zext i32 %a to i64
22 %c = icmp ne i32 %a, 0
23 br i1 %c, label %if, label %end