1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -O0 -mtriple=aarch64-- -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s
5 target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
7 define void @imm_s32_gpr() { ret void }
8 define void @imm_s64_gpr() { ret void }
13 # Check that we select a 32-bit immediate into a MOVi32imm.
19 - { id: 0, class: gpr }
25 ; CHECK-LABEL: name: imm_s32_gpr
26 ; CHECK: [[MOVi32imm:%[0-9]+]]:gpr32 = MOVi32imm -1234
27 ; CHECK: $w0 = COPY [[MOVi32imm]]
28 %0(s32) = G_CONSTANT i32 -1234
33 # Check that we select a 64-bit immediate into a MOVi64imm.
39 - { id: 0, class: gpr }
45 ; CHECK-LABEL: name: imm_s64_gpr
46 ; CHECK: [[MOVi32imm:%[0-9]+]]:gpr32 = MOVi32imm 1234
47 ; CHECK: [[SUBREG_TO_REG:%[0-9]+]]:gpr64all = SUBREG_TO_REG 0, [[MOVi32imm]], %subreg.sub_32
48 ; CHECK: $x0 = COPY [[SUBREG_TO_REG]]
49 %0(s64) = G_CONSTANT i64 1234