Skip to content

Commit 5e184f0

Browse files
committed
Add more unsupport cases
1 parent ddb67d2 commit 5e184f0

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

mlir/test/Conversion/ArithToEmitC/arith-to-emitc-unsupported.mlir

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,3 +157,35 @@ func.func @arith_truncf(%arg0: f64) -> f32 {
157157
%truncd = arith.truncf %arg0 to_nearest_away : f64 to f32
158158
return %truncd : f32
159159
}
160+
161+
// -----
162+
163+
func.func @arith_extf_f128(%arg0: f32) -> f128 {
164+
// expected-error @+1 {{failed to legalize operation 'arith.truncf'}}
165+
%extd = arith.extf %arg0 : f32 to f128
166+
return %extd : f128
167+
}
168+
169+
// -----
170+
171+
func.func @arith_truncf_f128(%arg0: f128) -> f32 {
172+
// expected-error @+1 {{failed to legalize operation 'arith.truncf'}}
173+
%truncd = arith.truncf %arg0 : f128 to f32
174+
return %truncd : f32
175+
}
176+
177+
// -----
178+
179+
func.func @arith_extf_vector(%arg0: vector<4xf32>) -> vector<4xf64> {
180+
// expected-error @+1 {{failed to legalize operation 'arith.truncf'}}
181+
%extd = arith.extf %arg0 : vector<4xf32> to vector<4xf64>
182+
return %extd : vector<4xf64>
183+
}
184+
185+
// -----
186+
187+
func.func @arith_truncf_vector(%arg0: vector<4xf64>) -> vector<4xf32> {
188+
// expected-error @+1 {{failed to legalize operation 'arith.truncf'}}
189+
%truncd = arith.truncf %arg0 : vector<4xf64> to vector<4xf32>
190+
return %truncd : vector<4xf32>
191+
}

0 commit comments

Comments
 (0)