We only did this for primitive temporaries.
Unfortunately, the existing Pointer::toAPValue() won't do here, since
we're expected to set an rvalue on the LifetimeExtendedTemporaryDecl.
Differential Revision: https://reviews.llvm.org/D144457
Previous commit on ALU made an error by changing CV_ROR to CVROR. Revert it.
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D158261
This is a reland of 28134a29fdedd8972acdfb39223571ddcc15dc59 which was
reverted due to behavioral differences between 32 and 64 bit builds that
have since been fixed.
Differential Revision: https://reviews.llvm.org/D158217
MSVC has a __cpuidex function implemented to call the underlying cpuid
instruction which accepts a leaf, subleaf, and data array that the output
data is written into. This patch adds this functionality into clang
under the cpuid.h header. This also makes clang match GCC's behavior.
GCC has had __cpuidex in its cpuid.h since 2020.
The workaround (relocation suppression) from
7b46bb8e327d45598eb794e14fc87e8c2a55f65e (2011) has been unneeded after
bfd0f01dd75f299bb521a2a31f270b3687be2cee (2014) removed
`if (!A_base) return false;` and `if (!B_base) return false;`
__has_keyword is almost not used anymore. There are only two cases. One can be replaced by __has_builtin and the other seems entirely redundant, so we can remove the definition.
Reviewed By: #libc, Mordante
Spies: Mordante, libcxx-commits
Differential Revision: https://reviews.llvm.org/D158215
This avoids having to add `_LIBCPP_ENUM_VIS`, since that is handled through `type_visibility` and GCC always makes the visibility of enums default. It also fixes and missing `_LIBCPP_EXPORTED_FROM_ABI` on classes when using Clang.
Reviewed By: ldionne, #libc
Spies: libcxx-commits
Differential Revision: https://reviews.llvm.org/D153658
This reverts commit 28134a29fdedd8972acdfb39223571ddcc15dc59.
This patch was causing build failures on multiple buildbots on 32-bit
architectures. Reverting now so I can deboug out-of-trunk and resubmit
later.
My thought is that we can directly select W instructions using s32.
This will likely require combines and other optimizations eventually,
but this makes a simple starting point.
I'm slowly prototyping a similar approach for SelectionDAG.
Reviewed By: reames
Differential Revision: https://reviews.llvm.org/D157770
While testing the std module with -DLIBCXX_ENABLE_WIDE_CHARACTERS=OFF
the build failed. These functions are not exported from the module since
they use wchar_t. Disable them in the headers too.
Reviewed By: #libc, philnik
Differential Revision: https://reviews.llvm.org/D158199
This patch splits OpBase.td into smaller files, focusing on individual,
implementations of functionalities.
This patch is marked NFC, as it just splits the implementation into multiple
files and includes them back into OpBase.td, so it doesn't break anything.
Most of the patch is mechanical, with chunks of implementation being shifted
into indvidual files. The main things to look out are:
- Classes and Definations added to Utils.td
- Headers of files
- Any thing that should have been split but isn't
Reviewed By: rriddle, Mogball
Differential Revision: https://reviews.llvm.org/D156067
As far as I can tell, there's nothing Windows-specific about the
test and it passes fine on other platforms.
I found this test when running
rg clang_cl clang/test | rg '%s' | rg -v -- ' -- ' | rg -v not
after 547ee1c81fceaabcb to see if other tests were missing `--`
before `%s` in `%clang_cl` invocations. This was the only one.
Since it used to run only on Windows, it wasn't needed, but as far
as I can tell there's no reason to run it only on Windows.
Differential Revision: https://reviews.llvm.org/D158279
BEFORE:
```
overflow.cpp:1:21: warning: overflow in expression; result is -2147483648 with type 'int' [-Winteger-overflow]
1 | int x = __INT_MAX__ + 1 + 3;
| ^
overflow.cpp:2:9: warning: overflow in expression; result is -2147483648 with type 'int' [-Winteger-overflow]
2 | int a = -(1 << 31) + 1;
| ^
```
AFTER:
```
overflow.cpp:1:21: warning: overflow in expression; result is -2147483648 with type 'int' [-Winteger-overflow]
1 | int x = __INT_MAX__ + 1 + 3;
| ~~~~~~~~~~~~^~~
overflow.cpp:2:9: warning: overflow in expression; result is -2147483648 with type 'int' [-Winteger-overflow]
2 | int a = -(1 << 31) + 1;
| ^~~~~~~~~~
```
Reviewed By: tbaeder
Differential Revision: https://reviews.llvm.org/D157383
The --mapping_file switch was missing; the example would have been
rejected.
Reviewed By: #libc, Mordante
Differential Revision: https://reviews.llvm.org/D157785
This breaks the clang check-format on CI.
+ grep -rnI '[[:blank:]]$' clang/lib clang/include clang/docs
clang/lib/Analysis/UnsafeBufferUsage.cpp:2277:#endif
This patch implements getDomainSet and getRangeSet for PresburgerRelation
Reviewed By: Groverkss
Differential Revision: https://reviews.llvm.org/D158263
This patch is extracted from D96035, it adds support for the existing
DWARFLinker functionality. What is not supported yet:
1. Types deduplication(--odr mode).
2. Modules deduplication.
3. Generation of index tables.
Differential Revision: https://reviews.llvm.org/D153268
This patch adds a new transform operation `transform.loop.fuse_sibling`,
which given two loops, fuses them, assuming that they are independent.
The transform operation itself performs very basic checks to ensure
IR legality, and leaves the responsibility of ensuring independence on the user.
Reviewed By: ftynse
Differential Revision: https://reviews.llvm.org/D157069
The testcases mainly cover three situations:
- the arguments which should be immediates are non immediates.
- the immediate is out of upper limit of the argument type.
- the immediate is out of lower limit of the argument type.
Depends on D155830
Reviewed By: SixWeining
Differential Revision: https://reviews.llvm.org/D157571
For handling intrinsics, our approach is not simply to match them
one-to-one with instructions. Instead, we lower some intrinsics
to common nodes and then perform matching. The advantage of this
approach is that it allows us to fully utilize the passes available
at the common layer for optimizing purposes.
We perform error checks on the immediate operand of all intrinsics,
rather than waiting until the end to throw exceptions.
Reviewed By: SixWeining
Differential Revision: https://reviews.llvm.org/D155829