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
9 tracksRegLiveness: true
13 ; CHECK-LABEL: name: sbfx_s32
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
24 RET_ReallyLR implicit $w0
31 tracksRegLiveness: true
35 ; CHECK-LABEL: name: sbfx_s64
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
46 RET_ReallyLR implicit $x0
53 tracksRegLiveness: true
57 ; This is just an asr, so it's okay.
59 ; CHECK-LABEL: name: sbfx_s32_31_1
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
70 RET_ReallyLR implicit $w0
75 tracksRegLiveness: true
79 ; CHECK-LABEL: name: sbfx_s32_10_5
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
90 RET_ReallyLR implicit $w0
95 tracksRegLiveness: true
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
110 RET_ReallyLR implicit $x0