File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed
mlir/test/Conversion/ArithToEmitC Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff 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 <4 xf32 >) -> vector <4 xf64 > {
180+ // expected-error @+1 {{failed to legalize operation 'arith.truncf'}}
181+ %extd = arith.extf %arg0 : vector <4 xf32 > to vector <4 xf64 >
182+ return %extd : vector <4 xf64 >
183+ }
184+
185+ // -----
186+
187+ func.func @arith_truncf_vector (%arg0: vector <4 xf64 >) -> vector <4 xf32 > {
188+ // expected-error @+1 {{failed to legalize operation 'arith.truncf'}}
189+ %truncd = arith.truncf %arg0 : vector <4 xf64 > to vector <4 xf32 >
190+ return %truncd : vector <4 xf32 >
191+ }
You can’t perform that action at this time.
0 commit comments