| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
The dse_with_dbg_value.ll test committed with r273141 is removed because this
we no longer performs any type of back tracking, which is what was causing the
codegen differences with and without debug information.
Differential Revision: http://reviews.llvm.org/D21613
llvm-svn: 274660
|
|
|
|
|
|
|
|
|
|
| |
We were still crashing in the "no change" case because LVI was not
getting invalidated.
See the thread "Should analyses be able to hold AssertingVH to IR?
(related to PR28400)" for more discussion.
llvm-svn: 274656
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The cost model should not assume vector casts get completely scalarized, since
on targets that have vector support, the common case is a partial split up to
the legal vector size. So, when a vector cast gets split, the resulting casts
end up legal and cheap.
Instead of pessimistically assuming scalarization, base TTI can use the costs
the concrete TTI provides for the split vector, plus a fudge factor to account
for the cost of the split itself. This fudge factor is currently 1 by default,
except on AMDGPU where inserts and extracts are considered free.
Differential Revision: http://reviews.llvm.org/D21251
llvm-svn: 274642
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We currently always vectorize induction variables. However, if an induction
variable is only used for counting loop iterations or computing addresses with
getelementptr instructions, we don't need to do this. Vectorizing these trivial
induction variables can create vector code that is difficult to simplify later
on. This is especially true when the unroll factor is greater than one, and we
create vector arithmetic when computing step vectors. With this patch, we check
if an induction variable is only used for counting iterations or computing
addresses, and if so, scalarize the arithmetic when computing step vectors
instead. This allows for greater simplification.
This patch addresses the suboptimal pointer arithmetic sequence seen in
PR27881.
Reference: https://llvm.org/bugs/show_bug.cgi?id=27881
Differential Revision: http://reviews.llvm.org/D21620
llvm-svn: 274627
|
|
|
|
|
|
| |
Differential revision: http://reviews.llvm.org/D21957
llvm-svn: 274611
|
|
|
|
|
|
| |
MemorySSA construction
llvm-svn: 274606
|
|
|
|
| |
llvm-svn: 274465
|
|
|
|
| |
llvm-svn: 274460
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This actually uncovered a surprisingly large chain of ultimately unused
TLI args.
From what I can gather, this argument is a remnant of when
isKnownNonNull would look at the TLI directly.
The current approach seems to be that InferFunctionAttrs runs early in
the pipeline and uses TLI to annotate the TLI-dependent non-null
information as return attributes.
This also removes the dependence of functionattrs on TLI altogether.
llvm-svn: 274455
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D21945
llvm-svn: 274411
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
GetBoundryInstruction returns the last instruction as the instruction which follows or end(). Otherwise the last instruction in the boundry set is not being tested by isVectorizable().
Partially solve reordering of instructions. More extensive solution to follow.
Reviewers: tstellarAMD, llvm-commits, jlebar
Subscribers: escha, arsenm, mzolotukhin
Differential Revision: http://reviews.llvm.org/D21934
llvm-svn: 274389
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit r274327 since the tests fail. E.g.:
http://lab.llvm.org:8011/builders/clang-x86_64-linux-selfhost-modules/builds/17240
It looks like this commit is building on r274305, but that commit caused
a miscompile and was reverted in r274320.
llvm-svn: 274332
|
|
|
|
|
|
|
| |
https://llvm.org/bugs/show_bug.cgi?id=20242
https://llvm.org/bugs/show_bug.cgi?id=22005
llvm-svn: 274327
|
|
|
|
|
|
|
| |
If no alignment was set on the load/stores, it would vectorize
to the new type even though this increases the default alignment.
llvm-svn: 274323
|
|
|
|
| |
llvm-svn: 274322
|
|
|
|
|
|
|
| |
This needs to use inttoptr/ptrtoint if combining an int and pointer
load. If a pointer is used always do an integer load.
llvm-svn: 274321
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit r274305, since it breaks self-hosting:
http://lab.llvm.org:8080/green/job/clang-stage1-configure-RA_build/22349/
http://lab.llvm.org:8011/builders/clang-x86_64-linux-selfhost-modules/builds/17232
Note that the blamelist on lab.llvm.org:8011 is incorrect. The previous
build was r274299, but somehow r274305 wasn't included in the blamelist:
http://lab.llvm.org:8011/builders/clang-x86_64-linux-selfhost-modules
llvm-svn: 274320
|
|
|
|
|
|
|
| |
This was not passing the full instruction with metadata
to the alias query.
llvm-svn: 274318
|
|
|
|
|
|
|
|
|
|
|
|
| |
integer.
Fixes issues on some architectures where we use arithmetic ops to build
vectors, which can cause bad things to happen for loads/stores of mixed
types.
Patch by Fiona Glaser
llvm-svn: 274307
|
|
|
|
| |
llvm-svn: 274306
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This pass hoists duplicated computations in the program. The primary goal of
gvn-hoist is to reduce the size of functions before inline heuristics to reduce
the total cost of function inlining.
Pass written by Sebastian Pop, Aditya Kumar, Xiaoyu Hu, and Brian Rzycki.
Important algorithmic contributions by Daniel Berlin under the form of reviews.
Differential Revision: http://reviews.llvm.org/D19338
llvm-svn: 274305
|
|
|
|
|
|
| |
Also add test I forgot to add to r274296.
llvm-svn: 274299
|
|
|
|
| |
llvm-svn: 274296
|
|
|
|
|
|
|
| |
This was contributed by Apple, and I've been working on
minimal cleanups and generalizing it.
llvm-svn: 274293
|
|
|
|
|
|
|
|
| |
This will be re-used by the LoadStoreVectorizer.
Fix handling of range metadata and testcase by Justin Lebar.
llvm-svn: 274281
|
|
|
|
|
|
|
|
|
|
| |
Except the seed uniform instructions (conditional branch and consecutive ptr
instructions), dependencies to be added into uniform set should only be used
by existing uniform instructions or intructions outside of current loop.
Differential Revision: http://reviews.llvm.org/D21755
llvm-svn: 274262
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Found cases where DSE incorrectly add partially-overwritten intervals.
Please see the test case for details.
Reviewers: mcrosier, eeckstein, hfinkel
Subscribers: mcrosier, llvm-commits
Differential Revision: http://reviews.llvm.org/D21859
llvm-svn: 274237
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
https://llvm.org/bugs/show_bug.cgi?id=24766#c2
This removes a hack that was added for the benefit of x86 codegen.
It prevented shrinking the switch condition even to smaller legal (DataLayout) types.
We have a safety mechanism in CGP after:
http://reviews.llvm.org/rL251857
...so we're free to use the optimal (smallest) IR type now.
Differential Revision: http://reviews.llvm.org/D12965
llvm-svn: 274233
|
|
|
|
|
|
|
|
| |
If the incoming types are i1, then we don't have to pattern match any sext ops.
Differential Revision: http://reviews.llvm.org/D21740
llvm-svn: 274228
|
|
|
|
| |
llvm-svn: 274192
|
|
|
|
| |
llvm-svn: 274188
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a fix for PR27842.
An IR-level implementation of stack coloring tailored to work with
SafeStack. It is a bit weaker than the MI implementation in that it
does not the "lifetime start at first access" logic. This can be
improved in the future.
This patch also replaces the naive implementation of stack frame
layout with a greedy algorithm that can split existing stack slots
and even fit small objects inside the alignment padding of other
objects.
llvm-svn: 274162
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
|
|
|
|
|
|
|
|
| |
instructions
This removes some noise for D21775's test changes.
llvm-svn: 274155
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: This adds tests for covering all cases that FoldAndOfFCmps and FoldOrOfFCmps handle.
Reviewers: spatel
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D21844
llvm-svn: 274144
|
|
|
|
| |
llvm-svn: 274115
|
|
|
|
|
|
|
|
| |
bit for a recurrence with a NSW addition."
This is breaking an optimizaton remark test in clang. I've identified a couple fixes for that, but want to understand it better before I commit to anything.
llvm-svn: 274102
|
|
|
|
|
|
|
|
|
|
|
|
| |
a recurrence with a NSW addition.
If a operation for a recurrence is an addition with no signed wrap and both input sign bits are 0, then the result sign bit must also be 0. Similar for the negative case.
I found this deficiency while playing around with a loop in the x86 backend that contained a signed division that could be optimized into an unsigned division if we could prove both inputs were positive. One of them being the loop induction variable. With this patch we can perform the conversion for this case. One of the test cases here is a contrived variation of the loop I was looking at.
Differential revision: http://reviews.llvm.org/D21493
llvm-svn: 274098
|
|
|
|
|
|
|
|
|
|
|
|
| |
both address and result of load instructions"
Revert "[InstCombine] Combine A->B->A BitCast"
as this appears to cause PR27996 and as discussed in http://reviews.llvm.org/D20847
This reverts commits r270135 and r263734.
llvm-svn: 274094
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This fixes bug: https://llvm.org/bugs/show_bug.cgi?id=28282
Currently the cost model of constant hoisting checks the bit width of the data type of the constants.
However, the actual immediate value is small enough and not need to be hoisted.
This patch checks for the actual bit width needed for the constant.
Reviewers: t.p.northover, rengolin
Subscribers: aemerson, rengolin, llvm-commits
Differential Revision: http://reviews.llvm.org/D21668
llvm-svn: 274073
|
|
|
|
| |
llvm-svn: 274047
|
|
|
|
| |
llvm-svn: 274046
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a resubmittion of 263158 change after fixing the existing problem with intrinsics mangling (see LTO and intrinsics mangling llvm-dev thread for details).
This patch fixes the problem which occurs when loop-vectorize tries to use @llvm.masked.load/store intrinsic for a non-default addrspace pointer. It fails with "Calling a function with a bad signature!" assertion in CallInst constructor because it tries to pass a non-default addrspace pointer to the pointer argument which has default addrspace.
The fix is to add pointer type as another overloaded type to @llvm.masked.load/store intrinsics.
Reviewed By: reames
Differential Revision: http://reviews.llvm.org/D17270
llvm-svn: 274043
|
|
|
|
|
|
|
|
| |
If the load is conditional we can't hoist its 0-iteration instance to
the preheader because that would make it unconditional. Thus we would
access a memory location that the original loop did not access.
llvm-svn: 273991
|
|
|
|
|
|
| |
Differential revision: http://reviews.llvm.org/D21690
llvm-svn: 273952
|
|
|
|
|
|
|
|
|
|
|
| |
is small enough (PR28153)
This should fix PR28153:
https://llvm.org/bugs/show_bug.cgi?id=28153
Differential Revision: http://reviews.llvm.org/D21769
llvm-svn: 273951
|
|
|
|
| |
llvm-svn: 273936
|
|
|
|
|
|
|
| |
The bug is connected to vector GEPs.
https://llvm.org/bugs/show_bug.cgi?id=28313
llvm-svn: 273919
|
|
|
|
|
|
| |
The APInt matcher works with splat vectors, so we get this fold for vectors too.
llvm-svn: 273897
|
|
|
|
|
|
| |
intrinsics" since some of the clang tests don't expect to see the updated signatures.
llvm-svn: 273895
|