| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
This pass converts 64-bit instructions to 32-bit when possible.
llvm-svn: 213561
|
|
|
|
| |
llvm-svn: 213551
|
|
|
|
|
|
|
|
|
|
|
|
| |
This implements a solution for constant initializers suggested
by Vadim Girlin, where we store the data after the shader code
and then use the S_GETPC instruction to compute its address.
This saves use the trouble of creating a new buffer for constant data
and then having to pass the pointer to the kernel via user SGPRs or the
input buffer.
llvm-svn: 213530
|
|
|
|
| |
llvm-svn: 212214
|
|
|
|
| |
llvm-svn: 211524
|
|
|
|
| |
llvm-svn: 211187
|
|
|
|
| |
llvm-svn: 211116
|
|
|
|
| |
llvm-svn: 211115
|
|
|
|
| |
llvm-svn: 210869
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I can't get VGPR spilling to work reliable, so for now just emit
an error when the register allocator tries to spill VGPRs.
v2:
- Fix build
v3:
- Added crash fix when spilling SPGRs
v4:
- Use V_MOV_B32 as a dummy instruction instead of S_NOP
Patch by: Darren Powell
https://bugs.freedesktop.org/show_bug.cgi?id=75276
llvm-svn: 210588
|
|
|
|
|
|
|
|
|
|
|
| |
We need to make sure only one new instruction is added when spilling
otherwise the register allocator may crash.
This fixes a crash in the game Antichamber.
https://bugs.freedesktop.org/show_bug.cgi?id=75276
llvm-svn: 210587
|
|
|
|
| |
llvm-svn: 210568
|
|
|
|
| |
llvm-svn: 210567
|
|
|
|
| |
llvm-svn: 210476
|
|
|
|
| |
llvm-svn: 210135
|
|
|
|
|
|
| |
This prevents a future commit from regressing the load-i1.ll test.
llvm-svn: 208887
|
|
|
|
|
|
| |
This was broken by r208479
llvm-svn: 208740
|
|
|
|
| |
llvm-svn: 208479
|
|
|
|
| |
llvm-svn: 208432
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The register spiller assumes that only one new instruction is created
when spilling and restoring registers, so we need to emit pseudo
instructions for vector register spills and lower them after
register allocation.
v2:
- Fix calculation of lane index
- Extend VGPR liveness to end of program.
v3:
- Use SIMM16 field of S_NOP to specify multiple NOPs.
https://bugs.freedesktop.org/show_bug.cgi?id=75005
llvm-svn: 207843
|
|
|
|
| |
llvm-svn: 207660
|
|
|
|
| |
llvm-svn: 207197
|
|
|
|
|
|
|
|
| |
Use scalar BFE with constant shift and offset when possible.
This is complicated by the fact that the scalar version packs
the two operands of the vector version into one.
llvm-svn: 206558
|
|
|
|
| |
llvm-svn: 206547
|
|
|
|
| |
llvm-svn: 206498
|
|
|
|
|
|
| |
Otherwise we may not legalize some illegal REG_SEQUENCE instructions.
llvm-svn: 206497
|
|
|
|
|
|
|
| |
Better match what is done for VOPC to eventually
prefer selecting these.
llvm-svn: 206048
|
|
|
|
| |
llvm-svn: 205837
|
|
|
|
| |
llvm-svn: 205732
|
|
|
|
| |
llvm-svn: 205244
|
|
|
|
| |
llvm-svn: 205188
|
|
|
|
|
|
|
| |
Check the register class of each operand individually
to avoid an extra copy to a vgpr.
llvm-svn: 204662
|
|
|
|
|
|
|
| |
No longer asserts, but now you get moves loading legal immediates
into the split 32-bit operations.
llvm-svn: 204661
|
|
|
|
|
|
|
|
| |
Try to match scalar and first like the other instructions.
Expand 64-bit ands to a pair of 32-bit ands since that is not
available on the VALU.
llvm-svn: 204660
|
|
|
|
| |
llvm-svn: 204651
|
|
|
|
| |
llvm-svn: 204618
|
|
|
|
|
|
|
| |
Some of them also had the pattern on both, so this removes the
duplication.
llvm-svn: 204492
|
|
|
|
| |
llvm-svn: 204476
|
|
|
|
| |
llvm-svn: 204475
|
|
|
|
|
|
|
|
| |
The type of the immediates should not matter as long as the encoding is
equivalent to the encoding of one of the legal inline constants.
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 204056
|
|
|
|
|
|
|
| |
Added checks for number of operands and operand register classes.
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 204054
|
|
|
|
|
|
|
|
|
|
| |
operator* on the by-operand iterators to return a MachineOperand& rather than
a MachineInstr&. At this point they almost behave like normal iterators!
Again, this requires making some existing loops more verbose, but should pave
the way for the big range-based for-loop cleanups in the future.
llvm-svn: 203865
|
|
|
|
| |
llvm-svn: 203517
|
|
|
|
|
|
|
|
|
|
|
| |
DS instructions that access local memory can only uses addresses that
are less than or equal to the value of M0. When M0 is uninitialized,
then we experience undefined behavior.
This patch also changes the behavior to emit S_WQM_B64 on pixel shaders
no matter what kind of DS instruction is used.
llvm-svn: 201097
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
coalesces normal copies.
Without this, MachineCSE is powerless to handle redundant operations with truncated source operands.
This required fixing the 2-addr pass to handle tied subregisters. It isn't clear what combinations of subregisters can legally be tied, but the simple case of truncated source operands is now safely handled:
%vreg11<def> = COPY %vreg1:sub_32bit; GR32:%vreg11 GR64:%vreg1
%vreg12<def> = COPY %vreg2:sub_32bit; GR32:%vreg12 GR64:%vreg2
%vreg13<def,tied1> = ADD32rr %vreg11<tied0>, %vreg12<kill>, %EFLAGS<imp-def>
Test case: cse-add-with-overflow.ll.
This exposed an existing bug in
PPCInstrInfo::commuteInstruction. Thanks to Rafael for the test case:
PowerPC/crash.ll.
llvm-svn: 197465
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
SGPRs are spilled into VGPRs using the {READ,WRITE}LANE_B32 instructions.
v2:
- Fix encoding of Lane Mask
- Use correct register flags, so we don't overwrite the low dword
when restoring multi-dword registers.
v3:
- Register spilling seems to hang the GPU, so replace all shaders
that need spilling with a dummy shader.
v4:
- Fix *LANE definitions
- Change destination reg class for 32-bit SMRD instructions
v5:
- Remove small optimization that was crashing Serious Sam 3.
https://bugs.freedesktop.org/show_bug.cgi?id=68224
https://bugs.freedesktop.org/show_bug.cgi?id=71285
NOTE: This is a candidate for the 3.4 branch.
llvm-svn: 195880
|
|
|
|
|
|
|
| |
Moving into a VSrc doesn't always work, since it could be
replaced with an SGPR later.
llvm-svn: 195042
|
|
|
|
|
|
|
| |
No other SGPR operands are allowed, so if VCC is
used, move the other to a VGPR.
llvm-svn: 195041
|
|
|
|
| |
llvm-svn: 195034
|
|
|
|
|
|
|
| |
When replacing scalar operations with vector,
the wrong implicit output register was used.
llvm-svn: 195033
|