@@ -181,10 +181,6 @@ void loongarch::getLoongArchTargetFeatures(const Driver &D,
181
181
}
182
182
}
183
183
184
- // Select the `ual` feature determined by -m[no-]strict-align.
185
- AddTargetFeature (Args, Features, options::OPT_mno_strict_align,
186
- options::OPT_mstrict_align, " ual" );
187
-
188
184
// Accept but warn about these TargetSpecific options.
189
185
if (Arg *A = Args.getLastArgNoClaim (options::OPT_mabi_EQ))
190
186
A->ignoreTargetSpecific ();
@@ -257,50 +253,20 @@ void loongarch::getLoongArchTargetFeatures(const Driver &D,
257
253
Features.push_back (" -lasx" );
258
254
}
259
255
260
- // Select frecipe feature determined by -m[no-]frecipe.
261
- if (const Arg *A =
262
- Args.getLastArg (options::OPT_mfrecipe, options::OPT_mno_frecipe)) {
263
- if (A->getOption ().matches (options::OPT_mfrecipe))
264
- Features.push_back (" +frecipe" );
265
- else
266
- Features.push_back (" -frecipe" );
267
- }
268
-
269
- // Select lam-bh feature determined by -m[no-]lam-bh.
270
- if (const Arg *A =
271
- Args.getLastArg (options::OPT_mlam_bh, options::OPT_mno_lam_bh)) {
272
- if (A->getOption ().matches (options::OPT_mlam_bh))
273
- Features.push_back (" +lam-bh" );
274
- else
275
- Features.push_back (" -lam-bh" );
276
- }
277
-
278
- // Select lamcas feature determined by -m[no-]lamcas.
279
- if (const Arg *A =
280
- Args.getLastArg (options::OPT_mlamcas, options::OPT_mno_lamcas)) {
281
- if (A->getOption ().matches (options::OPT_mlamcas))
282
- Features.push_back (" +lamcas" );
283
- else
284
- Features.push_back (" -lamcas" );
285
- }
286
-
287
- // Select ld-seq-sa feature determined by -m[no-]ld-seq-sa.
288
- if (const Arg *A = Args.getLastArg (options::OPT_mld_seq_sa,
289
- options::OPT_mno_ld_seq_sa)) {
290
- if (A->getOption ().matches (options::OPT_mld_seq_sa))
291
- Features.push_back (" +ld-seq-sa" );
292
- else
293
- Features.push_back (" -ld-seq-sa" );
294
- }
295
-
296
- // Select div32 feature determined by -m[no-]div32.
297
- if (const Arg *A =
298
- Args.getLastArg (options::OPT_mdiv32, options::OPT_mno_div32)) {
299
- if (A->getOption ().matches (options::OPT_mdiv32))
300
- Features.push_back (" +div32" );
301
- else
302
- Features.push_back (" -div32" );
303
- }
256
+ AddTargetFeature (Args, Features, options::OPT_mno_strict_align,
257
+ options::OPT_mstrict_align, " ual" );
258
+ AddTargetFeature (Args, Features, options::OPT_mno_strict_align,
259
+ options::OPT_mstrict_align, " ual" );
260
+ AddTargetFeature (Args, Features, options::OPT_mfrecipe,
261
+ options::OPT_mno_frecipe, " frecipe" );
262
+ AddTargetFeature (Args, Features, options::OPT_mlam_bh,
263
+ options::OPT_mno_lam_bh, " lam-bh" );
264
+ AddTargetFeature (Args, Features, options::OPT_mlamcas,
265
+ options::OPT_mno_lamcas, " lamcas" );
266
+ AddTargetFeature (Args, Features, options::OPT_mld_seq_sa,
267
+ options::OPT_mno_ld_seq_sa, " ld-seq-sa" );
268
+ AddTargetFeature (Args, Features, options::OPT_mdiv32,
269
+ options::OPT_mno_div32, " div32" );
304
270
}
305
271
306
272
std::string loongarch::postProcessTargetCPUString (const std::string &CPU,
0 commit comments