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--- 6name: sbfx_s32 7legalized: true 8regBankSelected: true 9tracksRegLiveness: true 10body: | 11 bb.0: 12 liveins: $w0 13 ; CHECK-LABEL: name: sbfx_s32 14 ; CHECK: liveins: $w0 15 ; CHECK: %copy:gpr32 = COPY $w0 16 ; CHECK: %sbfx:gpr32 = SBFMWri %copy, 0, 9 17 ; CHECK: $w0 = COPY %sbfx 18 ; CHECK: RET_ReallyLR implicit $w0 19 %copy:gpr(s32) = COPY $w0 20 %cst1:gpr(s32) = G_CONSTANT i32 0 21 %cst2:gpr(s32) = G_CONSTANT i32 10 22 %sbfx:gpr(s32) = G_SBFX %copy, %cst1, %cst2 23 $w0 = COPY %sbfx 24 RET_ReallyLR implicit $w0 25 26... 27--- 28name: sbfx_s64 29legalized: true 30regBankSelected: true 31tracksRegLiveness: true 32body: | 33 bb.0: 34 liveins: $x0 35 ; CHECK-LABEL: name: sbfx_s64 36 ; CHECK: liveins: $x0 37 ; CHECK: %copy:gpr64 = COPY $x0 38 ; CHECK: %sbfx:gpr64 = SBFMXri %copy, 0, 9 39 ; CHECK: $x0 = COPY %sbfx 40 ; CHECK: RET_ReallyLR implicit $x0 41 %copy:gpr(s64) = COPY $x0 42 %cst1:gpr(s64) = G_CONSTANT i64 0 43 %cst2:gpr(s64) = G_CONSTANT i64 10 44 %sbfx:gpr(s64) = G_SBFX %copy, %cst1, %cst2 45 $x0 = COPY %sbfx 46 RET_ReallyLR implicit $x0 47 48... 49--- 50name: sbfx_s32_31_1 51legalized: true 52regBankSelected: true 53tracksRegLiveness: true 54body: | 55 bb.0: 56 liveins: $w0 57 ; This is just an asr, so it's okay. 58 59 ; CHECK-LABEL: name: sbfx_s32_31_1 60 ; CHECK: liveins: $w0 61 ; CHECK: %copy:gpr32 = COPY $w0 62 ; CHECK: %sbfx:gpr32 = SBFMWri %copy, 31, 31 63 ; CHECK: $w0 = COPY %sbfx 64 ; CHECK: RET_ReallyLR implicit $w0 65 %copy:gpr(s32) = COPY $w0 66 %cst1:gpr(s32) = G_CONSTANT i32 31 67 %cst2:gpr(s32) = G_CONSTANT i32 1 68 %sbfx:gpr(s32) = G_SBFX %copy, %cst1, %cst2 69 $w0 = COPY %sbfx 70 RET_ReallyLR implicit $w0 71--- 72name: sbfx_s32_10_5 73legalized: true 74regBankSelected: true 75tracksRegLiveness: true 76body: | 77 bb.0: 78 liveins: $w0 79 ; CHECK-LABEL: name: sbfx_s32_10_5 80 ; CHECK: liveins: $w0 81 ; CHECK: %copy:gpr32 = COPY $w0 82 ; CHECK: %sbfx:gpr32 = SBFMWri %copy, 10, 14 83 ; CHECK: $w0 = COPY %sbfx 84 ; CHECK: RET_ReallyLR implicit $w0 85 %copy:gpr(s32) = COPY $w0 86 %cst1:gpr(s32) = G_CONSTANT i32 10 87 %cst2:gpr(s32) = G_CONSTANT i32 5 88 %sbfx:gpr(s32) = G_SBFX %copy, %cst1, %cst2 89 $w0 = COPY %sbfx 90 RET_ReallyLR implicit $w0 91--- 92name: sbfx_s64_10_5 93legalized: true 94regBankSelected: true 95tracksRegLiveness: true 96body: | 97 bb.0: 98 liveins: $x0 99 ; CHECK-LABEL: name: sbfx_s64_10_5 100 ; CHECK: liveins: $x0 101 ; CHECK: %copy:gpr64 = COPY $x0 102 ; CHECK: %sbfx:gpr64 = SBFMXri %copy, 10, 14 103 ; CHECK: $x0 = COPY %sbfx 104 ; CHECK: RET_ReallyLR implicit $x0 105 %copy:gpr(s64) = COPY $x0 106 %cst1:gpr(s64) = G_CONSTANT i64 10 107 %cst2:gpr(s64) = G_CONSTANT i64 5 108 %sbfx:gpr(s64) = G_SBFX %copy, %cst1, %cst2 109 $x0 = COPY %sbfx 110 RET_ReallyLR implicit $x0 111