brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.9 KiB · 7c156f5 Raw
55 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py2; RUN: llc -mtriple=riscv32 -global-isel --stop-before=legalizer < %s -o - \3; RUN:   | FileCheck --check-prefix=RV32I %s4; RUN: llc -mtriple=riscv64 -global-isel --stop-before=legalizer < %s -o - \5; RUN:   | FileCheck --check-prefix=RV64I %s6 7declare i32 @foo(i32 noundef signext, ...)8 9define i32 @main() {10  ; RV32I-LABEL: name: main11  ; RV32I: bb.1.entry:12  ; RV32I-NEXT:   [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 013  ; RV32I-NEXT:   [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 114  ; RV32I-NEXT:   [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 215  ; RV32I-NEXT:   [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 316  ; RV32I-NEXT:   [[FRAME_INDEX:%[0-9]+]]:_(p0) = G_FRAME_INDEX %stack.0.retval17  ; RV32I-NEXT:   G_STORE [[C]](s32), [[FRAME_INDEX]](p0) :: (store (s32) into %ir.retval)18  ; RV32I-NEXT:   ADJCALLSTACKDOWN 0, 0, implicit-def $x2, implicit $x219  ; RV32I-NEXT:   $x10 = COPY [[C]](s32)20  ; RV32I-NEXT:   $x11 = COPY [[C1]](s32)21  ; RV32I-NEXT:   $x12 = COPY [[C2]](s32)22  ; RV32I-NEXT:   $x13 = COPY [[C3]](s32)23  ; RV32I-NEXT:   PseudoCALL target-flags(riscv-call) @foo, csr_ilp32_lp64, implicit-def $x1, implicit $x10, implicit $x11, implicit $x12, implicit $x13, implicit-def $x1024  ; RV32I-NEXT:   ADJCALLSTACKUP 0, 0, implicit-def $x2, implicit $x225  ; RV32I-NEXT:   [[COPY:%[0-9]+]]:_(s32) = COPY $x1026  ; RV32I-NEXT:   $x10 = COPY [[COPY]](s32)27  ; RV32I-NEXT:   PseudoRET implicit $x1028  ;29  ; RV64I-LABEL: name: main30  ; RV64I: bb.1.entry:31  ; RV64I-NEXT:   [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 032  ; RV64I-NEXT:   [[FRAME_INDEX:%[0-9]+]]:_(p0) = G_FRAME_INDEX %stack.0.retval33  ; RV64I-NEXT:   G_STORE [[C]](s32), [[FRAME_INDEX]](p0) :: (store (s32) into %ir.retval)34  ; RV64I-NEXT:   ADJCALLSTACKDOWN 0, 0, implicit-def $x2, implicit $x235  ; RV64I-NEXT:   [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 036  ; RV64I-NEXT:   [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 137  ; RV64I-NEXT:   [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 238  ; RV64I-NEXT:   [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 339  ; RV64I-NEXT:   $x10 = COPY [[C1]](s64)40  ; RV64I-NEXT:   $x11 = COPY [[C2]](s64)41  ; RV64I-NEXT:   $x12 = COPY [[C3]](s64)42  ; RV64I-NEXT:   $x13 = COPY [[C4]](s64)43  ; RV64I-NEXT:   PseudoCALL target-flags(riscv-call) @foo, csr_ilp32_lp64, implicit-def $x1, implicit $x10, implicit $x11, implicit $x12, implicit $x13, implicit-def $x1044  ; RV64I-NEXT:   ADJCALLSTACKUP 0, 0, implicit-def $x2, implicit $x245  ; RV64I-NEXT:   [[COPY:%[0-9]+]]:_(s64) = COPY $x1046  ; RV64I-NEXT:   [[ASSERT_SEXT:%[0-9]+]]:_(s64) = G_ASSERT_SEXT [[COPY]], 3247  ; RV64I-NEXT:   $x10 = COPY [[ASSERT_SEXT]](s64)48  ; RV64I-NEXT:   PseudoRET implicit $x1049entry:50  %retval = alloca i32, align 451  store i32 0, ptr %retval, align 452  %call = call noundef signext i32 (i32, ...) @foo(i32 noundef signext 0, i32 noundef signext 1, i32 noundef signext 2, i32 noundef signext 3)53  ret i32 %call54}55