| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
llvm-svn: 225410
|
|
|
|
|
|
|
|
|
|
|
| |
Use VGPR_32 register class instead. These two register classes were
identical and having separate classes was causing
SIInstrInfo::isLegalOperands() to be overly conservative in some cases.
This change is necessary to prevent future paches from missing a folding
opportunity in fneg-fabs.ll.
llvm-svn: 225382
|
|
|
|
|
|
|
| |
This is used to simplify the SIFoldOperands pass and make it easier to
fold immediates.
llvm-svn: 225373
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows folding of sequences like:
s[0:1] = s_mov_b64 4
v_add_i32 v0, s0, v0
v_addc_u32 v1, s1, v1
into
v_add_i32 v0, 4, v0
v_add_i32 v1, 0, v1
llvm-svn: 225369
|
|
|
|
|
|
|
| |
The constant bus restrictions only apply to VALU instructions. This
enables SIFoldOperands to fold immediates into SALU instructions.
llvm-svn: 224623
|
|
|
|
| |
llvm-svn: 224458
|
|
|
|
| |
llvm-svn: 224079
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was checking if pseudo-operands like the source
modifiers were using the constant bus, which happens to work
because the values these all can be happen to be valid inline
immediates.
This fixes a later commit which starts checking the register class
of the operands.
llvm-svn: 224078
|
|
|
|
| |
llvm-svn: 223614
|
|
|
|
|
|
|
|
|
| |
There are 3 changes:
- Convert 32-bit S_LSHL/LSHR/ASHR to their V_*REV variants for VI
- Lower RSQ_CLAMP for VI
- Don't generate MIN/MAX_LEGACY on VI
llvm-svn: 223604
|
|
|
|
| |
llvm-svn: 223125
|
|
|
|
|
|
|
|
|
|
|
| |
- Fix missing SALU format bits
- Remove unused isSALUInstr
- Add isVALU
- Switch isDS to use a bit like the others
- Move SIInstrInfo::is* functions to header
- Reorder so they are approximately sorted by type (SALU, VALU, memory)
llvm-svn: 223038
|
|
|
|
|
|
|
| |
We need to use a s_mov_b32 rather than a copy, so that CSE will
eliminate redundant moves to the m0 register.
llvm-svn: 222584
|
|
|
|
|
|
|
|
|
|
|
|
| |
A register operand that has a common sub-class with its instruction's
defined register class is not always legal. For example,
SReg_32 and M0Reg both have a common sub-class, but we can't
use an SReg_32 in instructions that expect a M0Reg.
This prevents the llvm.SI.sendmsg.ll test from failing when the fold
operand pass is added.
llvm-svn: 222368
|
|
|
|
|
|
|
|
|
| |
This partially makes up for not having address spaces
used for alias analysis in some simple cases.
This is not yet enabled by default so shouldn't change anything yet.
llvm-svn: 222286
|
|
|
|
|
|
|
|
|
| |
This was resulting in use of a register after a kill.
For some reason this showed up as a problem in many tests
when moving the SIFixSGPRCopies pass closer to instruction
selection.
llvm-svn: 222175
|
|
|
|
| |
llvm-svn: 222017
|
|
|
|
| |
llvm-svn: 222012
|
|
|
|
| |
llvm-svn: 221911
|
|
|
|
| |
llvm-svn: 220068
|
|
|
|
| |
llvm-svn: 220066
|
|
|
|
|
|
|
|
| |
The generic code trying to use findCommutedOpIndices won't
understand that it needs to swap the modifier operands also,
so it should fail if they are set.
llvm-svn: 220064
|
|
|
|
| |
llvm-svn: 220062
|
|
|
|
|
|
| |
Any commutable instruction will have at least src1.
llvm-svn: 220061
|
|
|
|
| |
llvm-svn: 219616
|
|
|
|
|
|
|
| |
Added a FIXME coment instead, we need to handle the case where the
two DS instructions being compared have different numbers of operands.
llvm-svn: 219236
|
|
|
|
|
|
| |
abs / neg are now part of the srcN_modifiers operands
llvm-svn: 218691
|
|
|
|
|
|
| |
If an instruction doesn't have src1, it doesn't have src2
llvm-svn: 218536
|
|
|
|
| |
llvm-svn: 218533
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of moving the first SGPR that is different than the first,
legalize the operand that requires the fewest moves if one
SGPR is used for multiple operands.
This saves extra moves and is also required for some instructions
which require that the same operand be used for multiple operands.
llvm-svn: 218532
|
|
|
|
|
|
|
|
|
| |
Disable the SGPR usage restriction parts of the DAG legalizeOperands.
It now should only be doing immediate folding until it can be replaced
later. The real legalization work is now done by the other
SIInstrInfo::legalizeOperands
llvm-svn: 218531
|
|
|
|
|
|
|
|
|
|
|
| |
The base implementation of commuteInstruction is used
in some cases, but it turns out this has been broken for a
long time since modifiers were inserted between the real operands.
The base implementation of commuteInstruction also fails on immediates,
which also needs to be fixed.
llvm-svn: 218530
|
|
|
|
|
|
|
|
| |
e.g. v_cndmask_b32 requires the condition operand be an SGPR.
If one of the source operands were an SGPR, that would be considered
the one SGPR use and the condition operand would be illegally moved.
llvm-svn: 218529
|
|
|
|
|
|
|
|
|
| |
This needs a test, but I'm not sure if it is currently possible and
I originally hit it due to a bug. Right now the only global address
operands have no reason to be VALU instructions, although it
theoretically could be a problem.
llvm-svn: 218528
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
No test since the current SIISelLowering::legalizeOperands
effectively hides this, and the general uses seem to only fire
on SALU instructions which don't have modifiers between
the operands.
When trying to use legalizeOperands immediately after
instruction selection, it now sees a lot more patterns
it did not see before which break on this.
llvm-svn: 218527
|
|
|
|
|
|
| |
warning. NFC.
llvm-svn: 218381
|
|
|
|
|
|
| |
Also fix leftover debug printing
llvm-svn: 218359
|
|
|
|
|
|
|
|
|
|
|
| |
The previous implementation was extending the live range of SGPRs
by modifying the live intervals directly. This was causing a lot
of machine verification errors when the machine scheduler was enabled.
The new implementation adds pseudo instructions with implicit uses to
extend the live ranges of SGPRs, which works much better.
llvm-svn: 218351
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
VGPRs are spilled to LDS. This still needs more testing, but
we need to at least enable it at -O0, because the fast register
allocator spills all registers that are live at the end of blocks
and without this some future commits will break the
flat-address-space.ll test.
v2: Only calculate thread id once
v3: Move insertion of spill instructions to
SIRegisterInfo::eliminateFrameIndex()
llvm-svn: 218348
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are new register classes VCSrc_* which represent operands that
can take an SGPR, VGPR or inline constant. The VSrc_* class is now used
to represent operands that can take an SGPR, VGPR, or a 32-bit
immediate.
This allows us to have more accurate checks for legality of
immediates, since before we had no way to distinguish between operands
that supported any 32-bit immediate and operands which could only
support inline constants.
llvm-svn: 218334
|
|
|
|
| |
llvm-svn: 218324
|
|
|
|
|
|
|
|
|
|
| |
Since read2 / write2 are emitted for 4-byte aligned 8-byte
accesses, these are seen by the scheduler.
The DAG scheduler is semi-deprecated, so just
ignore these for now.
llvm-svn: 217969
|
|
|
|
| |
llvm-svn: 217968
|
|
|
|
| |
llvm-svn: 217777
|
|
|
|
|
|
|
|
|
|
|
| |
Need to convert the 64 element offset into bytes, not just the element
size like the normal case instructions.
Noticed by inspection. This can't be hit now because
st64 instructions aren't emitted during instruction selection,
and the post-RA scheduler isn't enabled.
llvm-svn: 217560
|
|
|
|
|
|
|
|
|
|
| |
We must constrain the destination register class of legalized operands
to a VGPR class or else the illegal operand may be folded back into
the instruction by the register coalescer.
This fixes a bug in add.ll that will be uncovered by future commits.
llvm-svn: 217249
|
|
|
|
|
|
| |
https://bugs.freedesktop.org/show_bug.cgi?id=83416
llvm-svn: 217248
|
|
|
|
|
|
|
| |
Also fix bug this exposed where when legalizing an immediate
operand, a v_mov_b32 would be created with a VSrc dest register.
llvm-svn: 217108
|
|
|
|
|
|
|
|
|
|
| |
This fixes a crash in the OpenCV test:
ImgprocWarpResizeArea/Resize.Mat/16
There is no test case for this, because this failure depends on a
specific ordering of the loads, which could easily change.
llvm-svn: 217040
|
|
|
|
| |
llvm-svn: 216220
|