File tree 1 file changed +18
-0
lines changed
llvm/test/Transforms/InstCombine
1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -134,6 +134,24 @@ define noalias i8* @calloc_constant_zero_size3(i64 %n) {
134
134
ret i8* %call
135
135
}
136
136
137
+ define noalias i8* @calloc_constant_zero_size4 (i64 %n ) {
138
+ ; CHECK-LABEL: @calloc_constant_zero_size4(
139
+ ; CHECK-NEXT: [[CALL:%.*]] = tail call noalias i8* @calloc(i64 0, i64 1)
140
+ ; CHECK-NEXT: ret i8* [[CALL]]
141
+ ;
142
+ %call = tail call noalias i8* @calloc (i64 0 , i64 1 )
143
+ ret i8* %call
144
+ }
145
+
146
+ define noalias i8* @calloc_constant_zero_size5 (i64 %n ) {
147
+ ; CHECK-LABEL: @calloc_constant_zero_size5(
148
+ ; CHECK-NEXT: [[CALL:%.*]] = tail call noalias i8* @calloc(i64 1, i64 0)
149
+ ; CHECK-NEXT: ret i8* [[CALL]]
150
+ ;
151
+ %call = tail call noalias i8* @calloc (i64 1 , i64 0 )
152
+ ret i8* %call
153
+ }
154
+
137
155
define noalias i8* @calloc_constant_size () {
138
156
; CHECK-LABEL: @calloc_constant_size(
139
157
; CHECK-NEXT: [[CALL:%.*]] = tail call noalias dereferenceable_or_null(128) i8* @calloc(i64 16, i64 8)
You can’t perform that action at this time.
0 commit comments