[all-commits] [llvm/llvm-project] e04c05: [SystemZ] Fix invalid assumption in getCPUNameFrom...

Ulrich Weigand via All-commits all-commits at lists.llvm.org
Tue Jul 20 04:40:14 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e04c05e8230e383493774cb3636587d3c0b5f288
      https://github.com/llvm/llvm-project/commit/e04c05e8230e383493774cb3636587d3c0b5f288
  Author: Ulrich Weigand <ulrich.weigand at de.ibm.com>
  Date:   2021-07-20 (Tue, 20 Jul 2021)

  Changed paths:
    M llvm/lib/Support/Host.cpp
    M llvm/unittests/Support/Host.cpp

  Log Message:
  -----------
  [SystemZ] Fix invalid assumption in getCPUNameFromS390Model

Code in getCPUNameFromS390Model currently assumes that the
numerical value of the model number always increases with
future hardware.  While this has happened to be the case
with the last few machines, it is not guaranteed -- that
assumption was violated with (much) older machines, and
it can be violated again with future machines.

Fix by explicitly listing model numbers for all supported
machine models.




More information about the All-commits mailing list