================ @@ -179,6 +179,13 @@ void sparc::getSparcTargetFeatures(const Driver &D, const ArgList &Args, Features.push_back("-hard-quad-float"); } + if (Arg *A = Args.getLastArg(options::OPT_mv8plus, options::OPT_mno_v8plus)) { + if (A->getOption().matches(options::OPT_mv8plus)) ---------------- koachan wrote:
It is true that those flags primarily control the target environment, however, on GCC, `-m[no-]v8plus` also implies that V9 instructions are available (or not, in case of `-mno-v8plus`) (e.g when multiplying 64-bit numbers: https://godbolt.org/z/5zdWez6qz). Also, unlike `-mx32`, `-m[no-]v8plus` is intended for use with 32-bit target (`-m32`); again, with GCC, `-mv8plus` raises an error with `-m64`, and `-mno-v8plus` is ignored (i.e it still generates 64-bit instructions) (https://godbolt.org/z/PcfMcT8cf). It would be possible to define the flags such that `-m[no-]v8plus` do not touch the V9 feature bit, but I feel like that would defeat the purpose of V8+ environment (that is, to let 32-bit code use some 64-bit V9 instructions). https://github.com/llvm/llvm-project/pull/98713 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits