InstCombine: Improve SimplifyDemandedFPClass min/max handling (#175382)
Refine handling of minimum/maximum and minimumnum/maximumnum. The
previous folds to input were based on sign bit checks. This was too
conservative with 0s. This can now consider -0 as less than or equal
to +0 as appropriate, account for nsz. It additionally can handle
cases like one half is known positive normal and the other subnormal.
[NFC][LLVM][Support] Namespace cleanup in Error.cpp (#175838)
- Fix indentation of code within anonymous namespace.
- Make `getErrorErrorCat` static.
- Use namespace qualifier to define standalone functions in `llvm` namespace.
[MLIR][XeGPU] bug fix: removing temporary slice layout at the pass end (#172589)
Removing temporary slice layout (besides the regular layout) at the end
of wg distribution and blocking pass.
The PR also drop sg_data/inst_data from anchor layouts in every
wg-to-sg/blocking/unrolling pattern.
---------
Signed-off-by: Dmitry Chigarev <dmitry.chigarev at intel.com>
Co-authored-by: Dmitry Chigarev <dmitry.chigarev at intel.com>
[AMDGPU] Add test for v_fmamk_f16/v_fmaak_f16 in real-true16. NFC (#173307)
This is to display a bug in real true16 mode that we do not have
an allocatable 16-bit VGPR class and these instructions do not
have VOP3 forms for allocatable VGPR_16 to be used. To use these
instructions 'VGPR_16_Lo128' must be allocable.
[AMDGPU] Add optimization for llvm.amdgcn.wave.shuffle in uniform cases (#174795)
When the llvm.amdgcn.wave.shuffle intrinsic is called with a uniform
Index operand, it is effectively the same as the llvm.amdgcn.readlane
intrinsic. This change handles this situation and replaces it with the
readlane intrinsic
---------
Signed-off-by: Domenic Nutile <domenic.nutile at gmail.com>
Revert "[OpenCL] Set KHR extensions minimum version to OpenCL 1.0" (#175993)
Reverts llvm/llvm-project#175120
llvm-project/amd/device-libs/opencl/src/image/imwrap.cl:461:1: error: no
matching function for call to 'get_image_height'
461 | GD2GEN(_2Dad)
| ^~~~~~~~~~~~~
llvm-project/amd/device-libs/opencl/src/image/imwrap.cl:460:1: error: no
matching function for call to 'get_image_width'
460 | GD2GEN(_2Dd)
| ^~~~~~~~~~~~
"Depth images are required with other image support for OpenCL 2.0."
stack.c: avoid arithmetic on pointers to void
In stack.c r1.34 I converted one 'char *' too many to 'void *', thereby
relying on a gcc/clang extension which interprets the fictional void
type as a type of size 1 (that's what the stack code wants, fortunately).
As pointed out in the link below, -Wpointer-arith would have caught this:
https://gcc.gnu.org/onlinedocs/gcc/Pointer-Arith.html
MSVC flags this as follows:
D:\a\portable\portable\crypto\stack\stack.c(211,23): error C2036: 'const void *': unknown size [D:\a\portable\portable\build\crypto\crypto_obj.vcxproj].
Pull in workaround from the portable repo which undoes the char * -> void *
conversion.
ok jsing millert
devel/llvm17: fix build with clang 21
Recent versions of clang complain about explicit copy constructors,
leading to errors similar to:
/wrkdirs/usr/ports/devel/llvm17/work-default/llvm-project-17.0.6.src/llvm/tools/sancov/sancov.cpp
/wrkdirs/usr/ports/devel/llvm17/work-default/llvm-project-17.0.6.src/llvm/tools/sancov/sancov.cpp:521:42: error: chosen constructor is explicit in copy-initialization
521 | return SpecialCaseList::createOrDie({{ClIgnorelist}},
| ^~~~~~~~~~~~~~
/usr/include/c++/v1/string:1153:64: note: explicit constructor declared here
1153 | _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit basic_string(const _Tp& __t) {
| ^
/usr/include/c++/v1/__vector/vector.h:276:91: note: passing argument to parameter '__il' here
276 | _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI vector(initializer_list<value_type> __il) {
| ^
In this case, `ClIgnoreList` is an instance of `cl::opt`, not a
`std::string` as expected. Use `getValue()` to get the actual
`std::string` value.
[6 lines not shown]
devel/llvm16: fix build with clang 21
Recent versions of clang complain about explicit copy constructors,
leading to errors similar to:
/wrkdirs/usr/ports/devel/llvm16/work-default/llvm-project-16.0.6.src/llvm/tools/sancov/sancov.cpp:521:42: error: chosen constructor is explicit in copy-initialization
521 | return SpecialCaseList::createOrDie({{ClIgnorelist}},
| ^~~~~~~~~~~~~~
/usr/include/c++/v1/string:1153:64: note: explicit constructor declared here
1153 | _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit basic_string(const _Tp& __t) {
| ^
/usr/include/c++/v1/__vector/vector.h:276:91: note: passing argument to parameter '__il' here
276 | _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI vector(initializer_list<value_type> __il) {
| ^
In this case, `ClIgnorelist` is an instance of `cl::opt`, not a
`std::string` as expected. Use `getValue()` to get the actual
`std::string` value.
[5 lines not shown]
devel/llvm14: fix build with clang 21
Recent versions of clang complain about explicit copy constructors,
leading to errors similar to:
In file included from /wrkdirs/usr/ports/devel/llvm14/work/llvm-project-14.0.6.src/llvm/tools/sancov/sancov.cpp:14:
In file included from /wrkdirs/usr/ports/devel/llvm14/work/llvm-project-14.0.6.src/llvm/include/llvm/DebugInfo/Symbolize/Symbolize.h:19:
In file included from /wrkdirs/usr/ports/devel/llvm14/work/llvm-project-14.0.6.src/llvm/include/llvm/Object/ELFObjectFile.h:37:
In file included from /wrkdirs/usr/ports/devel/llvm14/work/llvm-project-14.0.6.src/llvm/include/llvm/Support/ScopedPrinter.h:19:
In file included from /wrkdirs/usr/ports/devel/llvm14/work/llvm-project-14.0.6.src/llvm/include/llvm/Support/JSON.h:49:
/wrkdirs/usr/ports/devel/llvm14/work/llvm-project-14.0.6.src/llvm/include/llvm/ADT/DenseMap.h:129:16: warning: variable 'NumEntries' set but not used [-Wunused-but-set-variable]
129 | unsigned NumEntries = getNumEntries();
| ^
/wrkdirs/usr/ports/devel/llvm14/work/llvm-project-14.0.6.src/llvm/tools/sancov/sancov.cpp:512:42: error: chosen constructor is explicit in copy-initialization
512 | return SpecialCaseList::createOrDie({{ClBlacklist}},
| ^~~~~~~~~~~~~
/usr/include/c++/v1/string:1153:64: note: explicit constructor declared here
1153 | _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit basic_string(const _Tp& __t) {
| ^
[13 lines not shown]
devel/llvm13: fix build with clang 21
Recent versions of clang complain about explicit copy constructors,
leading to errors similar to:
In file included from /wrkdirs/usr/ports/devel/llvm13/work/llvm-project-13.0.1.src/llvm/tools/sancov/sancov.cpp:16:
In file included from /wrkdirs/usr/ports/devel/llvm13/work/llvm-project-13.0.1.src/llvm/include/llvm/MC/MCContext.h:12:
/wrkdirs/usr/ports/devel/llvm13/work/llvm-project-13.0.1.src/llvm/include/llvm/ADT/DenseMap.h:128:16: warning: variable 'NumEntries' set but not used [-Wunused-but-set-variable]
128 | unsigned NumEntries = getNumEntries();
| ^
/wrkdirs/usr/ports/devel/llvm13/work/llvm-project-13.0.1.src/llvm/tools/sancov/sancov.cpp:512:42: error: chosen constructor is explicit in copy-initialization
512 | return SpecialCaseList::createOrDie({{ClBlacklist}},
| ^~~~~~~~~~~~~
/usr/include/c++/v1/string:1153:64: note: explicit constructor declared here
1153 | _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit basic_string(const _Tp& __t) {
| ^
/usr/include/c++/v1/__vector/vector.h:276:91: note: passing argument to parameter '__il' here
276 | _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI vector(initializer_list<value_type> __il) {
| ^
[10 lines not shown]
devel/llvm12: fix build with clang 21
Recent versions of clang complain about explicit copy constructors,
leading to errors similar to:
In file included from /wrkdirs/usr/ports/devel/llvm12/work/llvm-project-12.0.1.src/llvm/tools/sancov/sancov.cpp:16:
In file included from /wrkdirs/usr/ports/devel/llvm12/work/llvm-project-12.0.1.src/llvm/include/llvm/MC/MCContext.h:12:
/wrkdirs/usr/ports/devel/llvm12/work/llvm-project-12.0.1.src/llvm/include/llvm/ADT/DenseMap.h:128:16: warning: variable 'NumEntries' set but not used [-Wunused-but-set-variable]
128 | unsigned NumEntries = getNumEntries();
| ^
/wrkdirs/usr/ports/devel/llvm12/work/llvm-project-12.0.1.src/llvm/tools/sancov/sancov.cpp:512:42: error: chosen constructor is explicit in copy-initialization
512 | return SpecialCaseList::createOrDie({{ClBlacklist}},
| ^~~~~~~~~~~~~
/usr/include/c++/v1/string:1153:64: note: explicit constructor declared here
1153 | _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit basic_string(const _Tp& __t) {
| ^
/usr/include/c++/v1/__vector/vector.h:276:91: note: passing argument to parameter '__il' here
276 | _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI vector(initializer_list<value_type> __il) {
| ^
[10 lines not shown]
devel/llvm14: fix build with clang 21
Recent versions of clang complain about explicit copy constructors,
leading to errors similar to:
In file included from /wrkdirs/usr/ports/devel/llvm14/work/llvm-project-14.0.6.src/llvm/tools/sancov/sancov.cpp:14:
In file included from /wrkdirs/usr/ports/devel/llvm14/work/llvm-project-14.0.6.src/llvm/include/llvm/DebugInfo/Symbolize/Symbolize.h:19:
In file included from /wrkdirs/usr/ports/devel/llvm14/work/llvm-project-14.0.6.src/llvm/include/llvm/Object/ELFObjectFile.h:37:
In file included from /wrkdirs/usr/ports/devel/llvm14/work/llvm-project-14.0.6.src/llvm/include/llvm/Support/ScopedPrinter.h:19:
In file included from /wrkdirs/usr/ports/devel/llvm14/work/llvm-project-14.0.6.src/llvm/include/llvm/Support/JSON.h:49:
/wrkdirs/usr/ports/devel/llvm14/work/llvm-project-14.0.6.src/llvm/include/llvm/ADT/DenseMap.h:129:16: warning: variable 'NumEntries' set but not used [-Wunused-but-set-variable]
129 | unsigned NumEntries = getNumEntries();
| ^
/wrkdirs/usr/ports/devel/llvm14/work/llvm-project-14.0.6.src/llvm/tools/sancov/sancov.cpp:512:42: error: chosen constructor is explicit in copy-initialization
512 | return SpecialCaseList::createOrDie({{ClBlacklist}},
| ^~~~~~~~~~~~~
/usr/include/c++/v1/string:1153:64: note: explicit constructor declared here
1153 | _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit basic_string(const _Tp& __t) {
| ^
[11 lines not shown]
devel/llvm17: fix build with clang 21
Recent versions of clang complain about explicit copy constructors,
leading to errors similar to:
/wrkdirs/usr/ports/devel/llvm17/work-default/llvm-project-17.0.6.src/llvm/tools/sancov/sancov.cpp
/wrkdirs/usr/ports/devel/llvm17/work-default/llvm-project-17.0.6.src/llvm/tools/sancov/sancov.cpp:521:42: error: chosen constructor is explicit in copy-initialization
521 | return SpecialCaseList::createOrDie({{ClIgnorelist}},
| ^~~~~~~~~~~~~~
/usr/include/c++/v1/string:1153:64: note: explicit constructor declared here
1153 | _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit basic_string(const _Tp& __t) {
| ^
/usr/include/c++/v1/__vector/vector.h:276:91: note: passing argument to parameter '__il' here
276 | _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI vector(initializer_list<value_type> __il) {
| ^
In this case, `ClIgnoreList` is an instance of `cl::opt`, not a
`std::string` as expected. Use `getValue()` to get the actual
`std::string` value.
[4 lines not shown]
devel/llvm16: fix build with clang 21
Recent versions of clang complain about explicit copy constructors,
leading to errors similar to:
/wrkdirs/usr/ports/devel/llvm16/work-default/llvm-project-16.0.6.src/llvm/tools/sancov/sancov.cpp:521:42: error: chosen constructor is explicit in copy-initialization
521 | return SpecialCaseList::createOrDie({{ClIgnorelist}},
| ^~~~~~~~~~~~~~
/usr/include/c++/v1/string:1153:64: note: explicit constructor declared here
1153 | _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit basic_string(const _Tp& __t) {
| ^
/usr/include/c++/v1/__vector/vector.h:276:91: note: passing argument to parameter '__il' here
276 | _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI vector(initializer_list<value_type> __il) {
| ^
In this case, `ClIgnorelist` is an instance of `cl::opt`, not a
`std::string` as expected. Use `getValue()` to get the actual
`std::string` value.
[3 lines not shown]
devel/llvm13: fix build with clang 21
Recent versions of clang complain about explicit copy constructors,
leading to errors similar to:
In file included from /wrkdirs/usr/ports/devel/llvm13/work/llvm-project-13.0.1.src/llvm/tools/sancov/sancov.cpp:16:
In file included from /wrkdirs/usr/ports/devel/llvm13/work/llvm-project-13.0.1.src/llvm/include/llvm/MC/MCContext.h:12:
/wrkdirs/usr/ports/devel/llvm13/work/llvm-project-13.0.1.src/llvm/include/llvm/ADT/DenseMap.h:128:16: warning: variable 'NumEntries' set but not used [-Wunused-but-set-variable]
128 | unsigned NumEntries = getNumEntries();
| ^
/wrkdirs/usr/ports/devel/llvm13/work/llvm-project-13.0.1.src/llvm/tools/sancov/sancov.cpp:512:42: error: chosen constructor is explicit in copy-initialization
512 | return SpecialCaseList::createOrDie({{ClBlacklist}},
| ^~~~~~~~~~~~~
/usr/include/c++/v1/string:1153:64: note: explicit constructor declared here
1153 | _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit basic_string(const _Tp& __t) {
| ^
/usr/include/c++/v1/__vector/vector.h:276:91: note: passing argument to parameter '__il' here
276 | _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI vector(initializer_list<value_type> __il) {
| ^
[8 lines not shown]
devel/llvm12: fix build with clang 21
Recent versions of clang complain about explicit copy constructors,
leading to errors similar to:
In file included from /wrkdirs/usr/ports/devel/llvm12/work/llvm-project-12.0.1.src/llvm/tools/sancov/sancov.cpp:16:
In file included from /wrkdirs/usr/ports/devel/llvm12/work/llvm-project-12.0.1.src/llvm/include/llvm/MC/MCContext.h:12:
/wrkdirs/usr/ports/devel/llvm12/work/llvm-project-12.0.1.src/llvm/include/llvm/ADT/DenseMap.h:128:16: warning: variable 'NumEntries' set but not used [-Wunused-but-set-variable]
128 | unsigned NumEntries = getNumEntries();
| ^
/wrkdirs/usr/ports/devel/llvm12/work/llvm-project-12.0.1.src/llvm/tools/sancov/sancov.cpp:512:42: error: chosen constructor is explicit in copy-initialization
512 | return SpecialCaseList::createOrDie({{ClBlacklist}},
| ^~~~~~~~~~~~~
/usr/include/c++/v1/string:1153:64: note: explicit constructor declared here
1153 | _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit basic_string(const _Tp& __t) {
| ^
/usr/include/c++/v1/__vector/vector.h:276:91: note: passing argument to parameter '__il' here
276 | _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI vector(initializer_list<value_type> __il) {
| ^
[8 lines not shown]
security/snowflake-tor: Fix build port
While here make small optimizations.
PR: 291387
Tested by: leres
Approved by: egypcio (maintainer, timeout)
NFH: 2026Q1
Co-authored-by: Vladimir Druzenko <vvd at FreeBSD.org>
(cherry picked from commit e6588e0017e2c180100429cb834afa6f3af57bd6)
security/snowflake-tor: Fix build port
While here make small optimizations.
PR: 291387
Tested by: leres
Approved by: egypcio (maintainer, timeout)
NFH: 2026Q1
Co-authored-by: Vladimir Druzenko <vvd at FreeBSD.org>