1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 2
2 # RUN: llc -mtriple=riscv64 -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s
7 tracksRegLiveness: true
12 ; CHECK-LABEL: name: sext_32_64
13 ; CHECK: liveins: $x10
15 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
16 ; CHECK-NEXT: [[ADDIW:%[0-9]+]]:gpr = ADDIW [[COPY]], 0
17 ; CHECK-NEXT: $x8 = COPY [[ADDIW]]
18 %0:gprb(s64) = COPY $x10
19 %1:gprb(s32) = G_TRUNC %0
20 %2:gprb(s64) = G_SEXT %1
24 name: sext_inreg_64_32
27 tracksRegLiveness: true
30 ; CHECK-LABEL: name: sext_inreg_64_32
31 ; CHECK: [[LUI:%[0-9]+]]:gpr = LUI 524288
32 ; CHECK-NEXT: [[ADDIW:%[0-9]+]]:gpr = ADDIW [[LUI]], 0
33 ; CHECK-NEXT: $x8 = COPY [[ADDIW]]
34 %0:gprb(s64) = G_CONSTANT i64 -2147483648
35 %1:gprb(s64) = G_SEXT_INREG %0, 32