[llvm] [AArch64] Consider histcnt smaller than i32 in the cost model (PR #108521)

Aaron Ballman via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 19 06:33:25 PDT 2024


AaronBallman wrote:

I think this caused a new build failure:
```
FAILED: lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64TargetTransformInfo.cpp.o 
ccache /home/docker/llvm-external-buildbots/clang.17.0.6/bin/clang++ --gcc-toolchain=/gcc-toolchain/usr -DGTEST_HAS_RTTI=0 -DLLVM_EXPORTS -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/lib/Target/AArch64 -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/llvm/lib/Target/AArch64 -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -std=c++17 -fPIC  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -MD -MT lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64TargetTransformInfo.cpp.o -MF lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64TargetTransformInfo.cpp.o.d -o lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64TargetTransformInfo.cpp.o -c /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:537:21: error: logical not is only applied to the left hand side of this comparison [-Werror,-Wlogical-not-parentheses]
  537 |     if (EC == 2 || (!LegalEltSize == 32 && EC == 4))
      |                     ^             ~~
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:537:21: note: add parentheses after the '!' to evaluate the comparison first
  537 |     if (EC == 2 || (!LegalEltSize == 32 && EC == 4))
      |                     ^
      |                      (                 )
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:537:21: note: add parentheses around left hand side expression to silence this warning
  537 |     if (EC == 2 || (!LegalEltSize == 32 && EC == 4))
      |                     ^
      |                     (            )
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:537:35: error: result of comparison of constant 32 with expression of type 'bool' is always false [-Werror,-Wtautological-constant-out-of-range-compare]
  537 |     if (EC == 2 || (!LegalEltSize == 32 && EC == 4))
      |                     ~~~~~~~~~~~~~ ^  ~~
2 errors generated.
```
https://lab.llvm.org/buildbot/#/builders/145/builds/1925

https://github.com/llvm/llvm-project/pull/108521


More information about the llvm-commits mailing list