1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py 2# RUN: llc -mtriple=aarch64-- -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s 3 4--- | 5 target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" 6 7 define i32 @const_s32() { ret i32 42 } 8 define i64 @const_s64() { ret i64 1234567890123 } 9 10 define i32 @fconst_s32() { ret i32 42 } 11 define i64 @fconst_s64() { ret i64 1234567890123 } 12 define float @fconst_s32_0() { ret float 0.0 } 13 define double @fconst_s64_0() { ret double 0.0 } 14... 15 16--- 17name: const_s32 18legalized: true 19regBankSelected: true 20registers: 21 - { id: 0, class: gpr } 22 23body: | 24 bb.0: 25 ; CHECK-LABEL: name: const_s32 26 ; CHECK: [[MOVi32imm:%[0-9]+]]:gpr32 = MOVi32imm 42 27 ; CHECK: $w0 = COPY [[MOVi32imm]] 28 %0(s32) = G_CONSTANT i32 42 29 $w0 = COPY %0(s32) 30... 31 32--- 33name: const_s64 34legalized: true 35regBankSelected: true 36registers: 37 - { id: 0, class: gpr } 38 39body: | 40 bb.0: 41 ; CHECK-LABEL: name: const_s64 42 ; CHECK: [[MOVi64imm:%[0-9]+]]:gpr64 = MOVi64imm 1234567890123 43 ; CHECK: $x0 = COPY [[MOVi64imm]] 44 %0(s64) = G_CONSTANT i64 1234567890123 45 $x0 = COPY %0(s64) 46... 47 48--- 49name: fconst_s32 50legalized: true 51regBankSelected: true 52registers: 53 - { id: 0, class: fpr } 54 55body: | 56 bb.0: 57 ; CHECK-LABEL: name: fconst_s32 58 ; CHECK: [[MOVi32imm:%[0-9]+]]:gpr32 = MOVi32imm 1080033280 59 ; CHECK: [[COPY:%[0-9]+]]:fpr32 = COPY [[MOVi32imm]] 60 ; CHECK: $s0 = COPY [[COPY]] 61 %0(s32) = G_FCONSTANT float 3.5 62 $s0 = COPY %0(s32) 63... 64 65--- 66name: fconst_s64 67legalized: true 68regBankSelected: true 69registers: 70 - { id: 0, class: fpr } 71 72body: | 73 bb.0: 74 ; CHECK-LABEL: name: fconst_s64 75 ; CHECK: [[MOVi64imm:%[0-9]+]]:gpr64 = MOVi64imm 4607182418800017408 76 ; CHECK: [[COPY:%[0-9]+]]:fpr64 = COPY [[MOVi64imm]] 77 ; CHECK: $d0 = COPY [[COPY]] 78 %0(s64) = G_FCONSTANT double 1.0 79 $d0 = COPY %0(s64) 80... 81 82--- 83name: fconst_s32_0 84legalized: true 85regBankSelected: true 86registers: 87 - { id: 0, class: fpr } 88 89body: | 90 bb.0: 91 ; CHECK-LABEL: name: fconst_s32_0 92 ; CHECK: [[FMOVS0_:%[0-9]+]]:fpr32 = FMOVS0 93 ; CHECK: $s0 = COPY [[FMOVS0_]] 94 %0(s32) = G_FCONSTANT float 0.0 95 $s0 = COPY %0(s32) 96... 97 98--- 99name: fconst_s64_0 100legalized: true 101regBankSelected: true 102registers: 103 - { id: 0, class: fpr } 104 105body: | 106 bb.0: 107 ; CHECK-LABEL: name: fconst_s64_0 108 ; CHECK: [[FMOVD0_:%[0-9]+]]:fpr64 = FMOVD0 109 ; CHECK: $x0 = COPY [[FMOVD0_]] 110 %0(s64) = G_FCONSTANT double 0.0 111 $x0 = COPY %0(s64) 112... 113