[all-commits] [llvm/llvm-project] 3ddf36: [X86] Fix warning in cpu detection due to unsigned...

Aiden Grossman via All-commits all-commits at lists.llvm.org
Fri Dec 29 18:02:34 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3ddf3685248a8c3ef07bf8290196c33521edb894
      https://github.com/llvm/llvm-project/commit/3ddf3685248a8c3ef07bf8290196c33521edb894
  Author: Aiden Grossman <agrossman154 at yahoo.com>
  Date:   2023-12-29 (Fri, 29 Dec 2023)

  Changed paths:
    M compiler-rt/lib/builtins/cpu_model/x86.c
    M llvm/lib/TargetParser/Host.cpp

  Log Message:
  -----------
  [X86] Fix warning in cpu detection due to unsigned comparison

a15532d7647a8a4b7fd2889bd97f6f72f273c4bf landed a patch that added
support for detecting more AMD znver2 CPUs and cleaned up some of the
surrounding code, including the znver3 detection. Since one model group
is 00h-0fh, I adjusted the check to include checking if the value is
greater than zero. Since the value is unsigned, this is always true and
gcc warns on it. This patch removes the comparison with zero to get rid
of the compiler warning.




More information about the All-commits mailing list