| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
llvm-svn: 374752
|
| |
|
|
| |
llvm-svn: 374751
|
| |
|
|
| |
llvm-svn: 374750
|
| |
|
|
|
|
|
|
|
| |
That way, lit's builtin 'env' command can be used for the 'env' bit.
Also it's clearer that way that the 'not' shouldn't cover 'env'
failures.
llvm-svn: 374749
|
| |
|
|
| |
llvm-svn: 374748
|
| |
|
|
|
|
|
|
| |
See commit message of r374746 for details.
Hopefully final bit of PR43592.
llvm-svn: 374747
|
| |
|
|
|
|
|
|
|
|
|
|
| |
clangd's test:// scheme expands to /clangd-test on non-Win and to
C:/clang-test on Win, so it can't be mixed freely with
file:///clangd-test since that's wrong on Windows. This makes both
tests consistenly use the test:// scheme. (Alternatively, we could use
the //INPUT_DIR pattern used in a few other tests.)
Part of PR43592.
llvm-svn: 374746
|
| |
|
|
|
|
|
|
|
| |
The test had a "UNSUPPORTED: win32" line, but the spelling of that
changed in r339307 a year ago. Finally update this test too.
Part of PR43592.
llvm-svn: 374745
|
| |
|
|
| |
llvm-svn: 374744
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This pass lowers is.constant and objectsize intrinsics not simplified by
earlier constant folding, i.e. if the object given is not constant or if
not using the optimized pass chain. The result is recursively simplified
and constant conditionals are pruned, so that dead blocks are removed
even for -O0. This allows inline asm blocks with operand constraints to
work all the time.
The new pass replaces the existing lowering in the codegen-prepare pass
and fallbacks in SDAG/GlobalISEL and FastISel. The latter now assert
on the intrinsics.
Differential Revision: https://reviews.llvm.org/D65280
llvm-svn: 374743
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
__builtin_constant_p used to be short-cut evaluated to false when
building with -O0. This is undesirable as it means that constant folding
in the front-end can give different results than folding in the back-end.
It can also create conditional branches on constant conditions that don't
get folded away. With the pending improvements to the llvm.is.constant
handling on the LLVM side, the short-cut is no longer useful.
Adjust various codegen tests to not depend on the short-cut or the
backend optimisations.
Differential Revision: https://reviews.llvm.org/D67638
llvm-svn: 374742
|
| |
|
|
| |
llvm-svn: 374741
|
| |
|
|
|
|
|
|
| |
No-return and will-return are exclusive, assuming the latter is more
prominent we can avoid updates of the former unless will-return is not
known for sure.
llvm-svn: 374739
|
| |
|
|
|
|
| |
Also includes a shortcut via AADereferenceable if possible.
llvm-svn: 374737
|
| |
|
|
|
|
|
|
|
| |
Even if an argument is captured, we cannot have an effect the function
does not have. This is fine except for the special case of `inalloca` as
it does not behave by the rules.
TODO: Maybe the special rule for `inalloca` is wrong after all.
llvm-svn: 374736
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This changes "CHECK" check lines to "ATTRIBUTOR" check lines where
necessary and also fixes the now exposed, mostly minor, problems.
Reviewers: sstefan1, uenoku
Subscribers: hiraditya, bollu, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68929
llvm-svn: 374735
|
| |
|
|
|
|
| |
dropRedundantMaskingOfLeftShiftInput()
llvm-svn: 374734
|
| |
|
|
|
|
| |
Moves Control Flow document from Reference docs page to User guides page.
llvm-svn: 374733
|
| |
|
|
|
|
|
|
| |
well as KnownZero.
We were already controlling whether the KnownZero elements were being written to the target mask, this extends it to the KnownUndef elements as well so we can prevent the target shuffle mask being manipulated at all.
llvm-svn: 374732
|
| |
|
|
|
|
|
|
|
|
| |
This enables use of the saturating truncate instructions when the
result type is less than 128 bits. It also enables the use of
saturating truncate instructions on KNL when the input is less
than 512 bits. We can do this by widening the input and then
extracting the result.
llvm-svn: 374731
|
| |
|
|
|
|
| |
Part of PR43592.
llvm-svn: 374730
|
| |
|
|
|
|
|
|
|
| |
(PR42689)
Any constant other than zero was already folded to undef if the index is undef.
https://bugs.llvm.org/show_bug.cgi?id=42689
llvm-svn: 374729
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
non-default address space
Follow-up to D68244 to account for a corner case discussed in:
https://bugs.llvm.org/show_bug.cgi?id=43501
Add one more restriction: if the pointer is deref-or-null and in a non-default
(non-zero) address space, we can't assume inbounds.
Differential Revision: https://reviews.llvm.org/D68706
llvm-svn: 374728
|
| |
|
|
|
|
|
|
|
|
| |
(Some lit tests still fail.)
See FIXME in diff for details.
Part of PR43592.
llvm-svn: 374727
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
While that pattern is indirectly handled via
reassociateShiftAmtsOfTwoSameDirectionShifts(),
that incursme one-use restriction on truncation,
which is pointless since we know that we'll produce a single instruction.
Additionally, *if* we are only looking for sign bit,
we don't need shifts to be identical,
which isn't the case in general,
and is the blocker for me in bug in question:
https://bugs.llvm.org/show_bug.cgi?id=43595
llvm-svn: 374726
|
| |
|
|
|
|
| |
getTargetShuffleInputs with KnownUndef/Zero results.
llvm-svn: 374725
|
| |
|
|
|
|
| |
Adjust SimplifyDemandedVectorEltsForTargetNode to use the known elts masks instead of recomputing it locally.
llvm-svn: 374724
|
| |
|
|
|
|
|
|
| |
* Add the conventional `return 0` to `main` in `variant.assign/conv.pass.cpp` and `variant.ctor/conv.pass.cpp`
* Fix some MSVC signed-to-unsigned conversion warnings by replacing `int` literarls with `unsigned int` literals
llvm-svn: 374723
|
| |
|
|
|
|
| |
...which `test/support/test_macros.h` can use to detect compiler support.
llvm-svn: 374722
|
| |
|
|
| |
llvm-svn: 374721
|
| |
|
|
|
|
| |
relanding {D68554} with fixed lit tests, checked on Windows and MacOS
llvm-svn: 374720
|
| |
|
|
| |
llvm-svn: 374719
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Windows triple currently turns on delayed template parsing, which
confuses several unit tests that use templates.
For now, just explicitly disable delayed template parsing. This isn't
ideal, but:
- the Windows triple will soon no longer use delayed template parsing
by default
- there's precedent for this in the clangd unit tests already
- let's get the clangd tests pass on Windows first before making
behavioral changes
Part of PR43592.
llvm-svn: 374718
|
| |
|
|
|
|
|
|
| |
dereference warning. NFCI.
The static analyzer is warning about a potential null dereference, but we should be able to use cast<> directly and if not assert will fire for us.
llvm-svn: 374717
|
| |
|
|
|
|
| |
The CmpInst::getType() calls can be replaced by just using User::getType() that it was dyn_cast from, and we then need to assert that any default predicate cases came from the CmpInst.
llvm-svn: 374716
|
| |
|
|
| |
llvm-svn: 374715
|
| |
|
|
|
|
|
| |
On Windows the signed/unsigned int conversions of APInt seems broken, so that
two of the test files marked as unsupported on Windows, as a hotfix.
llvm-svn: 374713
|
| |
|
|
| |
llvm-svn: 374712
|
| |
|
|
| |
llvm-svn: 374711
|
| |
|
|
| |
llvm-svn: 374710
|
| |
|
|
| |
llvm-svn: 374709
|
| |
|
|
| |
llvm-svn: 374708
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
size() or equal length
Summary:
New checker called bugprone-not-null-terminated-result. This checker finds
function calls where it is possible to cause a not null-terminated result.
Usually the proper length of a string is `strlen(src) + 1` or equal length
of this expression, because the null terminator needs an extra space.
Without the null terminator it can result in undefined behaviour when the
string is read.
The following and their respective `wchar_t` based functions are checked:
`memcpy`, `memcpy_s`, `memchr`, `memmove`, `memmove_s`, `strerror_s`,
`strncmp`, `strxfrm`
The following is a real-world example where the programmer forgot to
increase the passed third argument, which is `size_t length`.
That is why the length of the allocated memory is not enough to hold the
null terminator.
```
static char *stringCpy(const std::string &str) {
char *result = reinterpret_cast<char *>(malloc(str.size()));
memcpy(result, str.data(), str.size());
return result;
}
```
In addition to issuing warnings, fix-it rewrites all the necessary code.
It also tries to adjust the capacity of the destination array:
```
static char *stringCpy(const std::string &str) {
char *result = reinterpret_cast<char *>(malloc(str.size() + 1));
strcpy(result, str.data());
return result;
}
```
Note: It cannot guarantee to rewrite every of the path-sensitive memory
allocations.
Reviewed By: JonasToth, aaron.ballman, whisperity, alexfh
Tags: #clang-tools-extra, #clang
Differential Revision: https://reviews.llvm.org/D45050
llvm-svn: 374707
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
in combineSelect.
This seems to improve std::midpoint code where we have a min and
a max with the same condition. If we split the setcc we can end
up with two compares if the one of the operands is a constant.
Since we aggressively canonicalize compares with constants.
For non-constants it can interfere with our ability to share
control flow if we need to expand cmovs into control flow.
I'm also not sure I understand this min/max canonicalization code.
The motivating case talks about comparing with 0. But we don't
check for 0 explicitly.
Removes one instruction from the codegen for PR43658.
llvm-svn: 374706
|
| |
|
|
|
|
| |
instructions with avx512.
llvm-svn: 374705
|
| |
|
|
|
|
| |
tests. NFC
llvm-svn: 374704
|
| |
|
|
|
|
|
| |
Before, we eagerly split blocks even if it was not necessary, e.g., they
had a single unreachable instruction and only a single predecessor.
llvm-svn: 374703
|
| |
|
|
| |
llvm-svn: 374702
|
| |
|
|
|
|
| |
We use the verify max iteration now which is more reliable.
llvm-svn: 374701
|
| |
|
|
| |
llvm-svn: 374700
|