1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=riscv64 -mattr=+d -run-pass=legalizer %s -o - \
6 name: test_simple_alloca
11 ; CHECK-LABEL: name: test_simple_alloca
12 ; CHECK: liveins: $x10
14 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
15 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 4294967295
16 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY]], [[C]]
17 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 15
18 ; CHECK-NEXT: [[ADD:%[0-9]+]]:_(s64) = nuw G_ADD [[AND]], [[C1]]
19 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 -16
20 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND [[ADD]], [[C2]]
21 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(p0) = COPY $x2
22 ; CHECK-NEXT: [[PTRTOINT:%[0-9]+]]:_(s64) = G_PTRTOINT [[COPY1]](p0)
23 ; CHECK-NEXT: [[SUB:%[0-9]+]]:_(s64) = G_SUB [[PTRTOINT]], [[AND1]]
24 ; CHECK-NEXT: [[INTTOPTR:%[0-9]+]]:_(p0) = G_INTTOPTR [[SUB]](s64)
25 ; CHECK-NEXT: $x2 = COPY [[INTTOPTR]](p0)
26 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(p0) = COPY [[INTTOPTR]](p0)
27 ; CHECK-NEXT: $x10 = COPY [[COPY2]](p0)
28 ; CHECK-NEXT: PseudoRET implicit $x10
30 %0:_(s32) = G_TRUNC %1(s64)
31 %2:_(s64) = G_ZEXT %0(s32)
32 %5:_(s64) = G_CONSTANT i64 15
33 %6:_(s64) = nuw G_ADD %2, %5
34 %7:_(s64) = G_CONSTANT i64 -16
35 %8:_(s64) = G_AND %6, %7
36 %9:_(p0) = G_DYN_STACKALLOC %8(s64), 1
38 PseudoRET implicit $x10