|  | Commit message (Collapse) | Author | Age | Files | Lines | 
|---|
| | 
| 
| 
| 
| 
| 
| 
| | Legalization ends up creating many G_SEQUENCE/G_EXTRACT pairs which leads to
inefficient codegen (even for -O0), so add a quick pass over the function to
remove them again.
llvm-svn: 280155 | 
| | 
| 
| 
| 
| 
| 
| | s should be SReg_32 to be as general as possible. This can avoid a copy
from m0.
llvm-svn: 280154 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| | We're intending to move to a world where the type of a register is determined
by its (unique) def. This is incompatible with physregs, which are untyped.
It also means the other passes don't have to worry quite so much about
register-class compatibility and inserting COPYs appropriately.
llvm-svn: 280132 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| | Implement Bill's suggested fix for 32-bit targets for PR22711 (for the
alignment of each entry). As pointed out in the bug report, we could just force
the section alignment, since we only add pointer-sized things currently, but
this fix is somewhat more future-proof.
llvm-svn: 280049 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | The "long call" option forces the use of the indirect calling sequence for all
calls (even those that don't really need it). GCC provides this option; This is
helpful, under certain circumstances, for building very-large binaries, and
some other specialized use cases.
Fixes PR19098.
llvm-svn: 280040 | 
| | 
| 
| 
| 
| 
| | Otherwise, running the test on Darwin systems will not work.
llvm-svn: 280034 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | For little-Endian PowerPC, we generally target only P8 and later by default.
However, generic (older) 64-bit configurations are still an option, and in that
case, partword atomics are not available (e.g. stbcx.). To lower i8/i16 atomics
without true i8/i16 atomic operations, we emulate using i32 atomics in
combination with a bunch of shifting and masking, etc. The amount by which to
shift in little-Endian mode is different from the amount in big-Endian mode (it
is inverted -- meaning we can leave off the xor when computing the amount).
Fixes PR22923.
llvm-svn: 280022 | 
| | 
| 
| 
| 
| 
| | Patch by Pranav Bhandarkar.
llvm-svn: 279998 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | Summary:
GCNSchedStrategy re-uses most of GenericScheduler, it's just uses
a different method to compute the excess and critical register
pressure limits.
It's not enabled by default, to enable it you need to pass -misched=gcn
to llc.
Shader DB stats:
32464 shaders in 17874 tests
Totals:
SGPRS: 1542846 -> 1643125 (6.50 %)
VGPRS: 1005595 -> 904653 (-10.04 %)
Spilled SGPRs: 29929 -> 27745 (-7.30 %)
Spilled VGPRs: 334 -> 352 (5.39 %)
Scratch VGPRs: 1612 -> 1624 (0.74 %) dwords per thread
Code Size: 36688188 -> 37034900 (0.95 %) bytes
LDS: 1913 -> 1913 (0.00 %) blocks
Max Waves: 254101 -> 265125 (4.34 %)
Wait states: 0 -> 0 (0.00 %)
Totals from affected shaders:
SGPRS: 1338220 -> 1438499 (7.49 %)
VGPRS: 886221 -> 785279 (-11.39 %)
Spilled SGPRs: 29869 -> 27685 (-7.31 %)
Spilled VGPRs: 334 -> 352 (5.39 %)
Scratch VGPRs: 1612 -> 1624 (0.74 %) dwords per thread
Code Size: 34315716 -> 34662428 (1.01 %) bytes
LDS: 1551 -> 1551 (0.00 %) blocks
Max Waves: 188127 -> 199151 (5.86 %)
Wait states: 0 -> 0 (0.00 %)
Reviewers: arsenm, mareko, nhaehnle, MatzeB, atrick
Subscribers: arsenm, kzhuravl, llvm-commits
Differential Revision: https://reviews.llvm.org/D23688
llvm-svn: 279995 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | Summary:
The SILoadStoreOptimizer can now look ahead more then one instruction when
looking for instructions to merge, which greatly improves the number of
loads/stores that we are able to merge.
Moving the pass before scheduling avoids increasing register pressure after
the scheduler, so that the scheduler's register pressure estimates will be
more accurate.  It also gives more consistent results, since it is no longer
affected by minor scheduling changes.
Reviewers: arsenm
Subscribers: arsenm, kzhuravl, llvm-commits
Differential Revision: https://reviews.llvm.org/D23814
llvm-svn: 279991 | 
| | 
| 
| 
| | llvm-svn: 279988 | 
| | 
| 
| 
| 
| 
| | Fixes bug 29289
llvm-svn: 279986 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | This bug shows up with diamonds that share unpredicable, unanalyzable branches.
There's an included test case from Hexagon. What was happening was that we were
attempting to predicate the branch instruction despite the fact that it was
checked to be the same. Now for unanalyzable branches we skip over the branch
instructions when predicating the block.
Differential Revision: https://reviews.llvm.org/D23939
llvm-svn: 279985 | 
| | 
| 
| 
| 
| 
| | We should revert this change once we drop support for MSVC 2013.
llvm-svn: 279979 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | Assuming the default FP env, we should not treat fdiv and frem any differently in terms of 
trapping behavior than any other FP op. Ie, FP ops do not trap with the default FP env.
This matches how we treat these ops in IR with isSafeToSpeculativelyExecute(). There's a 
similar bug in Constant::canTrap().
This bug manifests in PR29114:
https://llvm.org/bugs/show_bug.cgi?id=29114
...as a sequence of scalar divisions instead of a vector division on x86 for a <3 x float> 
type.
Differential Revision: https://reviews.llvm.org/D23974
llvm-svn: 279970 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | MRI::getMaxLaneMaskForVReg does not always cover the whole register.
For example, on X86 the upper 16 bits of EAX cannot be accessed via
any subregister. Consequently, there is no lane mask that only covers
that part of EAX. The getMaxLaneMaskForVReg will return the union of
the lane masks for all subregisters, and in case of EAX, that union
will not cover the upper 16 bits.
This fixes https://llvm.org/bugs/show_bug.cgi?id=29132
llvm-svn: 279969 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | Summary:
For shrinking SOPK instructions, we were creating a hint to tell the
register allocator to use the register allocated for src0 for the dst
operand as well.  However, this seems to not work sometimes depending
on the order virtual registers are assigned physical registers.
To fix this, I've added a second allocation hint which does the reverse,
asks that the register allocated for dst is used for src0.
Reviewers: arsenm
Subscribers: arsenm, llvm-commits, kzhuravl
Differential Revision: https://reviews.llvm.org/D23862
llvm-svn: 279968 | 
| | 
| 
| 
| | llvm-svn: 279967 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| | The problem occurs when the Node doesn't updated in place , UpdateNodeOperation() return the node that already exist.
In this case assert fail in PromoteIntegerOperand() , N have 2 results ( val + chain).
Differential Revision: http://reviews.llvm.org/D23756
llvm-svn: 279961 | 
| | 
| 
| 
| 
| 
| 
| 
| | TEST sequence.
Differential Revision: http://reviews.llvm.org/D23490
llvm-svn: 279960 | 
| | 
| 
| 
| 
| 
| 
| 
| | create a ConstantFPSDNode and let that be lowered.
This allows broadcast loads to used when available.
llvm-svn: 279958 | 
| | 
| 
| 
| | llvm-svn: 279956 | 
| | 
| 
| 
| | llvm-svn: 279951 | 
| | 
| 
| 
| 
| 
| | Will be fixed in a future commit.
llvm-svn: 279949 | 
| | 
| 
| 
| | llvm-svn: 279939 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| | number of vector elements
Over eager combing prevents the correct folding of writemasks.
At the moment this occurs for ALL EVEX shuffles, in the future we need to check that the user of the root shuffle is a VSELECT that can fold to a writemask.
llvm-svn: 279934 | 
| | 
| 
| 
| 
| 
| | Implement lowering for atomicrmw min/max/umin/umax. Fixes PR28818.
llvm-svn: 279933 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| | AVX512F/AVX512VL.
Previously we weren't creating masked logical operations if bitcasts appeared between the logic operation and the select. The IR optimizers can move bitcasts across logic operations and create these cases. To minimize the number of cases we need to handle, this change promotes all logic ops to an i64 vector type just like when only SSE or AVX is available.
Unfortunately, this also has the consequence of making it difficult to select unmasked VPANDD/VPORD/VPXORD in all the cases it was previously used. This is the cause of most of the test change. This shouldn't result in any functional change though.
llvm-svn: 279929 | 
| | 
| 
| 
| 
| 
| 
| 
| | are bitcasts between the logic op and the select.
This is taken from optimized IR of clang test cases for masked logic ops.
llvm-svn: 279928 | 
| | 
| 
| 
| 
| 
| 
| 
| | Fix and improve tests
Differential Revision: https://reviews.llvm.org/D23899
llvm-svn: 279925 | 
| | 
| 
| 
| | llvm-svn: 279913 | 
| | 
| 
| 
| | llvm-svn: 279912 | 
| | 
| 
| 
| | llvm-svn: 279902 | 
| | 
| 
| 
| 
| 
| 
| 
| | There's only one use of this for the convenience
of a pattern. I think v_mov_b64_pseudo should also be
moved, but SIFoldOperands does currently make use of it.
llvm-svn: 279901 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| | When global-isel fails on a MachineFunction MF, MF will be cleaned up
and given to SDISel.
Thanks to this fallback, we can already perform correctness test even if
we support only a small portion of the functions in a test.
llvm-svn: 279891 | 
| | 
| 
| 
| 
| 
| 
| 
| | Adds a baseline test for lowering shuffles where the width of the output
vector is not twice the size of the input vectors. Many of those sequences
are suboptimal, and will hopefully be improved in follow-up patches.
llvm-svn: 279888 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | Summary:
If the scheduler clusters the loads, then the offsets will be sorted,
but it is possible for the scheduler to scheduler loads together
without out explicitly clustering them, which would give us non-sorted
offsets.
Also, we will want to do this if we move the load/store optimizer before
the scheduler.
Reviewers: arsenm
Subscribers: arsenm, llvm-commits, kzhuravl
Differential Revision: https://reviews.llvm.org/D23776
llvm-svn: 279870 | 
| | 
| 
| 
| 
| 
| 
| 
| | It will just be the same as the regular calling convention.
rdar://28029509
llvm-svn: 279853 | 
| | 
| 
| 
| 
| 
| 
| 
| | In the code to detect fixed-point conversions and make use of AArch64's special
instructions, we weren't prepared for weird types. The fptosi direction got
fixed recently, but not the similar sitofp code.
llvm-svn: 279852 | 
| | 
| 
| 
| 
| 
| | Differential Revision: https://reviews.llvm.org/D23677
llvm-svn: 279849 | 
| | 
| 
| 
| | llvm-svn: 279845 | 
| | 
| 
| 
| | llvm-svn: 279844 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | It's unclear how the old
    %res(32) = G_ICMP { s32, s32 } intpred(eq), %0, %1
is actually different from an s1 verison
    %res(1) = G_ICMP { s1, s32 } intpred(eq), %0, %1
so we'll remove it for now.
llvm-svn: 279843 | 
| | 
| 
| 
| | llvm-svn: 279842 | 
| | 
| 
| 
| | llvm-svn: 279841 | 
| | 
| 
| 
| | llvm-svn: 279840 | 
| | 
| 
| 
| | llvm-svn: 279839 | 
| | 
| 
| 
| 
| 
| 
| 
| | This is similar to what was done in r261675, but for CSINC rather than CSINV.
Differential Revision: https://reviews.llvm.org/D23892
llvm-svn: 279822 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | Summary:
In fuctions that contained debug info but were empty otherwise,
the ARM load/store optimizer could abort. This was because
function MergeReturnIntoLDM handled the special case where a
Machine Basic BLock is empty by calling MBB.empty(). However, this
returns false in presence of debug info, although the function
should be considered empty in the eyes of the load/store optimizer.
This has been fixed by handling the case where searching through the
block finds only debug instructions.
Reviewers: rengolin, dexonsmith, llvm-commits, jmolloy
Subscribers: t.p.northover, aemerson, rengolin, samparker
Differential Revision: https://reviews.llvm.org/D23847
llvm-svn: 279820 | 
| | 
| 
| 
| 
| 
| | integer domain
llvm-svn: 279811 |