InstCombine: Handle exp/exp2/exp10 in SimplifyDemandedFPClass
I'm working on optimizing out the tail sequences in the
implementations of the 4 different flavors of pow. These
include chains of selects on the various edge cases.
Related to #64870
InstCombine: Handle exp/exp2/exp10 in SimplifyDemandedFPClass
I'm working on optimizing out the tail sequences in the
implementations of the 4 different flavors of pow. These
include chains of selects on the various edge cases.
Related to #64870
ValueTracking: Add baseline tests for computeKnownFPClass exp (#173429)
This is already handled, but misses opportunities. Test cases
where the input is known positive or negative.
[Driver][SPIRV] Fix regular C/C++ compilation to AMD SPIRV.
Commit 4c6f398 introduced a non-working compilation path for regular C/C++ to AMD SPIRV; this commit fixes it.
For example, 4c6f398 was expecting an assembler phase but it was never supported since there is no assembler available for it.
Thus, the compilation starting from source code failed.
The compilation path is fixed by taking into account that we cannot rely on external dependencies such as spirv-link or spirv-as.
Thus, the backend emits bitcode and the SPIRVAMDToolChain's linker takes care of generating the final SPIRV as we already do for HIP.
[Driver][SPIRV] Fix regular C/C++ compilation to AMD SPIRV.
Commit 4c6f398 introduced a non-working compilation path for regular C/C++ to AMD SPIRV; this commit fixes it.
For example, 4c6f398 was expecting an assembler phase but it was never supported since there is no assembler available for it.
Thus, the compilation starting from source code failed.
The compilation path is fixed by taking into account that we cannot rely on external dependencies such as spirv-link or spirv-as.
Thus, the backend emits bitcode and the SPIRVAMDToolChain's linker takes care of generating the final SPIRV as we already do for HIP.
[clang-tidy] Enable C99 in `implicit-bool-conversion` and avoid FP with `bool` operands in C23 (#171070)
Closes [#170596](https://github.com/llvm/llvm-project/issues/170596)
---------
Co-authored-by: EugeneZelenko <eugene.zelenko at gmail.com>
Co-authored-by: Baranov Victor <bar.victor.2002 at gmail.com>
[InstCombine] Restrict `foldBitCeil` to power-of-two integer widths (#173849)
The masking rewrite in `foldBitCeil` assumes a power-of-two bitwidth.
For non-power-of-two integer types, `(-ctlz) & (BitWidth - 1)` is not
equivalent to `BitWidth - ctlz` and can miscompile.
This patch restricts the transform to power-of-two bitwidths.
Alive2 proof: https://alive2.llvm.org/ce/z/i2E6zT
Fixes #173787
[HLSL] Prevent uninitialized on 2 int arguments (#173352)
Unparsed HLSL semantics have 2 int/bool arguments with default values.
Those values are loaded using checkUInt32Argument, and thus this should
never fail.
But if something is wrong in the code above (or the def changed), this
code wouldn't catch it and we'd read uninitialized integers. This
commits checks both return values and assert if one fails. On release
builds, this would early return, causing a bad codegen, but such change
will be caught by tests.
[NFC][Clang] Remove unused include <tuple> in Lexer.cpp (#173801)
This header was not being used, as found by `Ctrl + F`-ing all the
declarations from `tuple` (found at
https://en.cppreference.com/w/cpp/header/tuple.html).
[BOLT] Overhaul the comments in PAuthGadgetScanner for readability (NFC) (#169801)
Update the comments in PAuthGadgetScanner.cpp to better describe the
current version of the code. Along the way, shorten identifier names
that are redundant taking their context into account:
`RegsToTrackInstsFor` (made `RegsToTrack`) and `getNumTrackedRegisters`
(made `getNumRegisters`).
Co-authored-by: Kristof Beyls <kristof.beyls at arm.com>
[FileCheck] Create test to highlight the "more than 9 back-references" issue. (#173501)
When back-referencing more than 9 variables in a CHECK line, FileCheck
will fail.
I intend to fix this issue in a later PR by adjusting FileCheck.