1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
2 ; RUN: llc -mtriple=riscv64 -verify-machineinstrs < %s \
5 define i128 @test_R_wide_scalar_simple(i128 noundef %0) nounwind {
6 ; CHECK-LABEL: test_R_wide_scalar_simple:
7 ; CHECK: # %bb.0: # %entry
9 ; CHECK-NEXT: # a2 <- a0
11 ; CHECK-NEXT: mv a0, a2
12 ; CHECK-NEXT: mv a1, a3
15 %1 = call i128 asm sideeffect "/* $0 <- $1 */", "=&R,R"(i128 %0)
19 define i64 @test_R_wide_scalar_with_ops(i64 noundef %0) nounwind {
20 ; CHECK-LABEL: test_R_wide_scalar_with_ops:
21 ; CHECK: # %bb.0: # %entry
22 ; CHECK-NEXT: mv a1, a0
24 ; CHECK-NEXT: # a2 <- a0
26 ; CHECK-NEXT: or a0, a2, a3
29 %1 = zext i64 %0 to i128
32 %4 = call i128 asm sideeffect "/* $0 <- $1 */", "=&R,R"(i128 %3)
33 %5 = trunc i128 %4 to i64
35 %7 = trunc i128 %6 to i64
40 define i128 @test_R_wide_scalar_inout(ptr %0, i128 noundef %1) nounwind {
41 ; CHECK-LABEL: test_R_wide_scalar_inout:
42 ; CHECK: # %bb.0: # %entry
43 ; CHECK-NEXT: addi sp, sp, -32
44 ; CHECK-NEXT: mv a3, a2
45 ; CHECK-NEXT: sd a0, 24(sp)
46 ; CHECK-NEXT: mv a2, a1
47 ; CHECK-NEXT: sd a1, 0(sp)
48 ; CHECK-NEXT: sd a3, 8(sp)
50 ; CHECK-NEXT: # a0; a2
52 ; CHECK-NEXT: sd a0, 24(sp)
53 ; CHECK-NEXT: sd a2, 0(sp)
54 ; CHECK-NEXT: sd a3, 8(sp)
55 ; CHECK-NEXT: mv a0, a2
56 ; CHECK-NEXT: mv a1, a3
57 ; CHECK-NEXT: addi sp, sp, 32
60 %2 = alloca ptr, align 8
61 %3 = alloca i128, align 16
62 store ptr %0, ptr %2, align 8
63 store i128 %1, ptr %3, align 16
64 %4 = load ptr, ptr %2, align 8
65 %5 = load i128, ptr %3, align 16
66 %6 = call { ptr, i128 } asm sideeffect "/* $0; $1 */", "=r,=R,0,1"(ptr %4, i128 %5)
67 %7 = extractvalue { ptr, i128} %6, 0
68 %8 = extractvalue { ptr, i128 } %6, 1
69 store ptr %7, ptr %2, align 8
70 store i128 %8, ptr %3, align 16
71 %9 = load i128, ptr %3, align 16