1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=aarch64-unknown-linux-gnu < %s 2>&1 | FileCheck %s
3 ; RUN: llc -mtriple=aarch64-unknown-linux-gnu -global-isel -global-isel-abort=1 < %s 2>&1 | FileCheck %s --check-prefix=GISEL
5 %struct.T = type { i32, i32 }
7 define i32 @freeze_int() {
8 ; CHECK-LABEL: freeze_int:
10 ; CHECK-NEXT: mul w0, w8, w8
13 ; GISEL-LABEL: freeze_int:
15 ; GISEL-NEXT: mul w0, w8, w8
17 %y1 = freeze i32 undef
18 %t1 = mul i32 %y1, %y1
22 define i5 @freeze_int2() {
23 ; CHECK-LABEL: freeze_int2:
25 ; CHECK-NEXT: mul w0, w8, w8
28 ; GISEL-LABEL: freeze_int2:
30 ; GISEL-NEXT: mul w0, w8, w8
37 define float @freeze_float() {
38 ; CHECK-LABEL: freeze_float:
40 ; CHECK-NEXT: fadd s0, s0, s0
43 ; GISEL-LABEL: freeze_float:
45 ; GISEL-NEXT: fadd s0, s0, s0
47 %y1 = freeze float undef
48 %t1 = fadd float %y1, %y1
52 define <2 x i32> @freeze_ivec() {
53 ; CHECK-LABEL: freeze_ivec:
55 ; CHECK-NEXT: add v0.2s, v0.2s, v0.2s
58 ; GISEL-LABEL: freeze_ivec:
60 ; GISEL-NEXT: add v0.2s, v0.2s, v0.2s
62 %y1 = freeze <2 x i32> undef
63 %t1 = add <2 x i32> %y1, %y1
67 define ptr @freeze_ptr() {
68 ; CHECK-LABEL: freeze_ptr:
70 ; CHECK-NEXT: add x0, x8, #4
73 ; GISEL-LABEL: freeze_ptr:
75 ; GISEL-NEXT: add x0, x8, #4
77 %y1 = freeze ptr undef
78 %t1 = getelementptr i8, ptr %y1, i64 4
82 define i32 @freeze_struct() {
83 ; CHECK-LABEL: freeze_struct:
85 ; CHECK-NEXT: add w0, w8, w8
88 ; GISEL-LABEL: freeze_struct:
90 ; GISEL-NEXT: add w0, w8, w8
92 %y1 = freeze %struct.T undef
93 %v1 = extractvalue %struct.T %y1, 0
94 %v2 = extractvalue %struct.T %y1, 1
95 %t1 = add i32 %v1, %v2
99 define i32 @freeze_anonstruct() {
100 ; CHECK-LABEL: freeze_anonstruct:
102 ; CHECK-NEXT: add w0, w8, w8
105 ; GISEL-LABEL: freeze_anonstruct:
107 ; GISEL-NEXT: add w0, w8, w8
109 %y1 = freeze {i32, i32} undef
110 %v1 = extractvalue {i32, i32} %y1, 0
111 %v2 = extractvalue {i32, i32} %y1, 1
112 %t1 = add i32 %v1, %v2
116 define i32 @freeze_anonstruct2() {
117 ; CHECK-LABEL: freeze_anonstruct2:
119 ; CHECK-NEXT: add w0, w8, w8, uxth
122 ; GISEL-LABEL: freeze_anonstruct2:
124 ; GISEL-NEXT: add w0, w8, w8, uxth
126 %y1 = freeze {i32, i16} undef
127 %v1 = extractvalue {i32, i16} %y1, 0
128 %v2 = extractvalue {i32, i16} %y1, 1
129 %z2 = zext i16 %v2 to i32
130 %t1 = add i32 %v1, %z2
134 define i64 @freeze_array() {
135 ; CHECK-LABEL: freeze_array:
137 ; CHECK-NEXT: add x0, x8, x8
140 ; GISEL-LABEL: freeze_array:
142 ; GISEL-NEXT: add x0, x8, x8
144 %y1 = freeze [2 x i64] undef
145 %v1 = extractvalue [2 x i64] %y1, 0
146 %v2 = extractvalue [2 x i64] %y1, 1
147 %t1 = add i64 %v1, %v2