================
@@ -239,7 +239,7 @@ arm::ReadTPMode arm::getReadTPMode(const Driver &D, const 
ArgList &Args,
       D.Diag(diag::err_drv_invalid_mtp) << A->getAsString(Args);
     return ReadTPMode::Invalid;
   }
-  return ReadTPMode::Soft;
+  return (isHardTPSupported(Triple) ? ReadTPMode::TPIDRURO : ReadTPMode::Soft);
----------------
smithp35 wrote:

We're missing out on handling an explicit `-mtp=auto` here. While rare I think 
it is worth matching gcc.

I think this could be done with changing
```
if (Arg *A = Args.getLastArg(options::OPT_mtp_mode_EQ))
```
To
```
Arg *A = Args.getLastArg(options::OPT_mtp_mode_EQ);
if (A && A->getValue() != "auto") {
  ...
}
return (isHardTPSupported(Triple) ? ReadTPMode::TPIDRURO : ReadTPMode::Soft);
```

https://github.com/llvm/llvm-project/pull/128901
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to