| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
llvm-svn: 239657
|
|
|
|
|
|
| |
Copy the kill flags when swapping the operands.
llvm-svn: 235687
|
|
|
|
|
|
|
| |
This should be fixed to properly understand all rematerializable
instructions while ignoring implicit reads of exec.
llvm-svn: 235671
|
|
|
|
| |
llvm-svn: 233077
|
|
|
|
|
|
|
| |
Other f64 opcodes not supported on SI can be lowered in a similar way.
v2: use complex VOP3 patterns
llvm-svn: 233076
|
|
|
|
|
|
|
| |
Don't use a separate table for compares anymore,
and use the same VOP2_REV class.
llvm-svn: 232992
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This enables very common cases to switch to the
smaller encoding.
All of the standard LLVM canonicalizations of comparisons
are the opposite of what we want. Compares with constants
are moved to the RHS, but the first operand can be an inline
immediate, literal constant, or SGPR using the 32-bit VOPC
encoding.
There are additional bad canonicalizations that should
also be fixed, such as canonicalizing ge x, k to gt x, (k + 1)
if this makes k no longer an inline immediate value.
llvm-svn: 232988
|
|
|
|
|
|
|
| |
This function assumed that SMRD instructions always have immediate
offsets, which is not always the case.
llvm-svn: 232957
|
|
|
|
|
|
| |
classes.
llvm-svn: 231954
|
|
|
|
| |
llvm-svn: 231797
|
|
|
|
|
|
|
| |
This fixes a machine verifier error in the salu-to-valu.ll, which
would have been exposed by a future commit.
llvm-svn: 231796
|
|
|
|
|
|
| |
Required by OpenGL (ARB_gpu_shader5).
llvm-svn: 231259
|
|
|
|
|
|
| |
Otherwise we have to emit thread-safe initialization for them. NFC.
llvm-svn: 230894
|
|
|
|
| |
llvm-svn: 230757
|
|
|
|
| |
llvm-svn: 230149
|
|
|
|
|
|
|
| |
This is a code size optimization when the constant
only has one use.
llvm-svn: 230148
|
|
|
|
| |
llvm-svn: 229751
|
|
|
|
|
|
| |
This should be handled by the OperandType checking.
llvm-svn: 229750
|
|
|
|
| |
llvm-svn: 229603
|
|
|
|
|
|
|
| |
This shows up without optimizations when vcc is required
to be used.
llvm-svn: 229226
|
|
|
|
|
|
| |
This hopefully should be fixed when VReg_1 is removed.
llvm-svn: 229225
|
|
|
|
|
|
|
| |
This requires considering the size of the operand when
checking immediate legality.
llvm-svn: 229135
|
|
|
|
| |
llvm-svn: 229034
|
|
|
|
|
|
| |
We were previously hard-coding soffset to 0.
llvm-svn: 228775
|
|
|
|
|
|
|
| |
SI only has standard versions. VI only has REV versions.
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 228037
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This can happen when a REV instruction is commuted.
The trick is not to define the _vi versions of instructions, which has these
consequences:
- code generation will always fail if a pseudo cannot be lowered
(very useful to catch bugs where an unsupported instruction somehow makes
it to the printer)
- ability to query if a pseudo can be lowered, which is done in commuteOpcode
to prevent REV from commuting to non-REV on VI
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 227990
|
|
|
|
|
|
| |
without a Function argument.
llvm-svn: 227638
|
|
|
|
|
|
|
| |
This is disabled by default, but can be enabled with the subtarget
feature: 'vgpr-spilling'
llvm-svn: 226597
|
|
|
|
|
|
|
|
| |
We were passing the scratch buffer address to the shaders via user sgprs,
but now we use external symbols and have the driver patch the shader
using reloc information.
llvm-svn: 226586
|
|
|
|
|
|
|
| |
Now that we have our own custom register operand types, we need
to handle them in the verifiier.
llvm-svn: 226583
|
|
|
|
| |
llvm-svn: 226190
|
|
|
|
|
|
|
|
| |
v2: modify hasVALU32BitEncoding instead
v3: - add pseudoToMCOpcode helper to AMDGPUInstInfo, which is used by both
hasVALU32BitEncoding and AMDGPUMCInstLower::lower
- report an error if a pseudo can't be lowered
llvm-svn: 226188
|
|
|
|
|
|
|
| |
This helps us avoid 'invalid register class for operand' verifier
errors.
llvm-svn: 225989
|
|
|
|
| |
llvm-svn: 225988
|
|
|
|
|
|
|
|
| |
The backend now assumes that all immediates are integers. This allows
us to simplify immediate handling code, becasue we no longer need to
handle fp and integer immediates differently.
llvm-svn: 225844
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are some operands which can take either immediates or registers
and we were previously using different register class to distinguish
between operands that could take immediates and those that could not.
This patch switches to using RegisterOperands which should simplify the
backend by reducing the number of register classes and also make it
easier to implement the assembler.
llvm-svn: 225662
|
|
|
|
| |
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
|