@@ -19,6 +19,8 @@ define i32 @make_const() {
19
19
ret i32 %x
20
20
}
21
21
22
+ ; TODO: This is not poison.
23
+
22
24
define float @make_const2 () {
23
25
; CHECK-LABEL: @make_const2(
24
26
; CHECK-NEXT: [[X:%.*]] = freeze float 1.000000e+01
@@ -38,6 +40,8 @@ define i32* @make_const_glb() {
38
40
ret i32* %k
39
41
}
40
42
43
+ ; TODO: This is not poison.
44
+
41
45
define i32 ()* @make_const_fn () {
42
46
; CHECK-LABEL: @make_const_fn(
43
47
; CHECK-NEXT: [[K:%.*]] = freeze i32 ()* @make_const
@@ -47,6 +51,8 @@ define i32()* @make_const_fn() {
47
51
ret i32 ()* %k
48
52
}
49
53
54
+ ; TODO: This is not poison.
55
+
50
56
define i32* @make_const_null () {
51
57
; CHECK-LABEL: @make_const_null(
52
58
; CHECK-NEXT: [[K:%.*]] = freeze i32* null
@@ -58,31 +64,30 @@ define i32* @make_const_null() {
58
64
59
65
define <2 x i32 > @constvector () {
60
66
; CHECK-LABEL: @constvector(
61
- ; CHECK-NEXT: [[X:%.*]] = freeze <2 x i32> <i32 0, i32 1>
62
- ; CHECK-NEXT: ret <2 x i32> [[X]]
67
+ ; CHECK-NEXT: ret <2 x i32> <i32 0, i32 1>
63
68
;
64
69
%x = freeze <2 x i32 > <i32 0 , i32 1 >
65
70
ret <2 x i32 > %x
66
71
}
67
72
68
73
define <3 x i5 > @constvector_weird () {
69
74
; CHECK-LABEL: @constvector_weird(
70
- ; CHECK-NEXT: [[X:%.*]] = freeze <3 x i5> <i5 0, i5 1, i5 10>
71
- ; CHECK-NEXT: ret <3 x i5> [[X]]
75
+ ; CHECK-NEXT: ret <3 x i5> <i5 0, i5 1, i5 10>
72
76
;
73
77
%x = freeze <3 x i5 > <i5 0 , i5 1 , i5 42 >
74
78
ret <3 x i5 > %x
75
79
}
76
80
77
81
define <2 x float > @constvector_FP () {
78
82
; CHECK-LABEL: @constvector_FP(
79
- ; CHECK-NEXT: [[X:%.*]] = freeze <2 x float> <float 0.000000e+00, float 1.000000e+00>
80
- ; CHECK-NEXT: ret <2 x float> [[X]]
83
+ ; CHECK-NEXT: ret <2 x float> <float 0.000000e+00, float 1.000000e+00>
81
84
;
82
85
%x = freeze <2 x float > <float 0 .0 , float 1 .0 >
83
86
ret <2 x float > %x
84
87
}
85
88
89
+ ; Negative test
90
+
86
91
define <2 x i32 > @constvector_noopt () {
87
92
; CHECK-LABEL: @constvector_noopt(
88
93
; CHECK-NEXT: [[X:%.*]] = freeze <2 x i32> <i32 0, i32 undef>
@@ -92,6 +97,8 @@ define <2 x i32> @constvector_noopt() {
92
97
ret <2 x i32 > %x
93
98
}
94
99
100
+ ; Negative test
101
+
95
102
define <3 x i5 > @constvector_weird_noopt () {
96
103
; CHECK-LABEL: @constvector_weird_noopt(
97
104
; CHECK-NEXT: [[X:%.*]] = freeze <3 x i5> <i5 0, i5 undef, i5 10>
@@ -101,6 +108,8 @@ define <3 x i5> @constvector_weird_noopt() {
101
108
ret <3 x i5 > %x
102
109
}
103
110
111
+ ; Negative test
112
+
104
113
define <2 x float > @constvector_FP_noopt () {
105
114
; CHECK-LABEL: @constvector_FP_noopt(
106
115
; CHECK-NEXT: [[X:%.*]] = freeze <2 x float> <float 0.000000e+00, float undef>
@@ -112,6 +121,8 @@ define <2 x float> @constvector_FP_noopt() {
112
121
113
122
@g = external global i16 , align 1
114
123
124
+ ; Negative test
125
+
115
126
define float @constant_expr () {
116
127
; CHECK-LABEL: @constant_expr(
117
128
; CHECK-NEXT: [[R:%.*]] = freeze float bitcast (i32 ptrtoint (i16* @g to i32) to float)
@@ -121,6 +132,8 @@ define float @constant_expr() {
121
132
ret float %r
122
133
}
123
134
135
+ ; Negative test
136
+
124
137
define <2 x i31 > @vector_element_constant_expr () {
125
138
; CHECK-LABEL: @vector_element_constant_expr(
126
139
; CHECK-NEXT: [[R:%.*]] = freeze <2 x i31> <i31 34, i31 ptrtoint (i16* @g to i31)>
0 commit comments