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: ubfx_s32
15 ; CHECK: %copy:gpr32 = COPY $w0
16 ; CHECK: %ubfx:gpr32 = UBFMWri %copy, 0, 9
17 ; CHECK: $w0 = COPY %ubfx
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 %ubfx:gpr(s32) = G_UBFX %copy, %cst1, %cst2
24 RET_ReallyLR implicit $w0
31 tracksRegLiveness: true
35 ; CHECK-LABEL: name: ubfx_s64
37 ; CHECK: %copy:gpr64 = COPY $x0
38 ; CHECK: %ubfx:gpr64 = UBFMXri %copy, 0, 9
39 ; CHECK: $x0 = COPY %ubfx
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 %ubfx:gpr(s64) = G_UBFX %copy, %cst1, %cst2
46 RET_ReallyLR implicit $x0
53 tracksRegLiveness: true
58 ; This is just a lsr, so it's okay.
60 ; CHECK-LABEL: name: ubfx_s32_31_1
62 ; CHECK: %copy:gpr32 = COPY $w0
63 ; CHECK: %ubfx:gpr32 = UBFMWri %copy, 31, 31
64 ; CHECK: $w0 = COPY %ubfx
65 ; CHECK: RET_ReallyLR implicit $w0
66 %copy:gpr(s32) = COPY $w0
67 %cst1:gpr(s32) = G_CONSTANT i32 31
68 %cst2:gpr(s32) = G_CONSTANT i32 1
69 %ubfx:gpr(s32) = G_UBFX %copy, %cst1, %cst2
71 RET_ReallyLR implicit $w0
76 tracksRegLiveness: true
80 ; CHECK-LABEL: name: ubfx_s32_10_5
82 ; CHECK: %copy:gpr32 = COPY $w0
83 ; CHECK: %ubfx:gpr32 = UBFMWri %copy, 10, 14
84 ; CHECK: $w0 = COPY %ubfx
85 ; CHECK: RET_ReallyLR implicit $w0
86 %copy:gpr(s32) = COPY $w0
87 %cst1:gpr(s32) = G_CONSTANT i32 10
88 %cst2:gpr(s32) = G_CONSTANT i32 5
89 %ubfx:gpr(s32) = G_UBFX %copy, %cst1, %cst2
91 RET_ReallyLR implicit $w0
98 tracksRegLiveness: true
102 ; CHECK-LABEL: name: ubfx_s64_10_5
103 ; CHECK: liveins: $x0
104 ; CHECK: %copy:gpr64 = COPY $x0
105 ; CHECK: %ubfx:gpr64 = UBFMXri %copy, 10, 14
106 ; CHECK: $x0 = COPY %ubfx
107 ; CHECK: RET_ReallyLR implicit $x0
108 %copy:gpr(s64) = COPY $x0
109 %cst1:gpr(s64) = G_CONSTANT i64 10
110 %cst2:gpr(s64) = G_CONSTANT i64 5
111 %ubfx:gpr(s64) = G_UBFX %copy, %cst1, %cst2
113 RET_ReallyLR implicit $x0