- Ouput and the third parameter should be v4i32.
- Add a 128 register class to hand the v4i32 case.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
A lot more tests for the operand combinations are needed. There should be a test where every operand is a VGPR, SGPR, inline integer immediate, inline FP immediate, and non-inline constant
include/llvm/IR/Intrinsics.td | ||
---|---|---|
152 ↗ | (On Diff #68638) | You don't need this |
lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp | ||
272–276 ↗ | (On Diff #68638) | You don't need SSrc128 |
lib/Target/AMDGPU/SIRegisterInfo.h | ||
118–119 ↗ | (On Diff #68638) | Indentation. This probably isn't needed to be handled since it's starting out as isAllocatable = 0 |
Update LIT tests to make sure using operand as a VGPR, SGPR, inline integer immediate, inline FP immediate, and non-inline constant.
I think we need some execution tests to make sure the inline immediates and quad SGPR really work
test/CodeGen/AMDGPU/llvm.amdgcn.mqsad.u32.u8.ll | ||
---|---|---|
25–26 ↗ | (On Diff #68887) | This is broken. Storing the constant to undef is not useful. The high bits also need to be 0, and the constant vector should be the direct operand to the call |
34–38 ↗ | (On Diff #68887) | None of these are inline fp immediates, and you don't want to do an fp cast to integer. You want the literal bit value for the FP immediate |
46–56 ↗ | (On Diff #68887) | Nothing here is constraining the input to be a VGPR. The simplest way to get an SGPR is to use a kernel argument value. To get a VGPR you should use a load from addrspace(1)* or use inline asm |
57 ↗ | (On Diff #68887) | Space before = (same for the other tests) |
lib/Target/AMDGPU/SIRegisterInfo.td | ||
---|---|---|
348–350 ↗ | (On Diff #68928) | We don't need this since the operand is required to be VReg_128 |
lib/Target/AMDGPU/SIRegisterInfo.td | ||
---|---|---|
348–350 ↗ | (On Diff #68928) | Are you sure that we don' t need this? Since VS_128 is used a lot by other definitions... |
lib/Target/AMDGPU/SIInstrInfo.td | ||
---|---|---|
1123 ↗ | (On Diff #69395) | This should not be VCSrc_128, because an immediate is not allowed |
Because this is a new width operand, there should be some assembler tests for it
lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp | ||
---|---|---|
276–278 ↗ | (On Diff #69410) | You should not need this |
lib/Target/AMDGPU/SIRegisterInfo.td | ||
403 ↗ | (On Diff #69410) | This should just be RegisterOperand |
404 ↗ | (On Diff #69410) | I don't think you need the custom matcher |
test/MC/AMDGPU/vop3.s | ||
---|---|---|
1–2 ↗ | (On Diff #70225) | Only the NOSI one should be checking the stderr. The -mcpu=SI shouldalso be removed. This breaks all of the SICI check lines |
test/MC/AMDGPU/vop3.s | ||
---|---|---|
363 ↗ | (On Diff #70439) | CIVI doesn't make sense, and you don't have such a prefix. You need a separate CI and VI check line for this |
test/MC/AMDGPU/vop3.s | ||
---|---|---|
363 ↗ | (On Diff #70537) | The check prefix is SICI but you are only using CI here |
test/MC/AMDGPU/vop3.s | ||
---|---|---|
363 ↗ | (On Diff #70537) | But v_mqsad won't work on SI, so I separate CI and VI for this test. For SI, NOSI is used to check the stderr. |
test/MC/AMDGPU/vop3.s | ||
---|---|---|
363 ↗ | (On Diff #70537) | That doesn't matter, you just need to use the same check prefix. CI isn't a check prefix so it isn't checking anything |
test/MC/AMDGPU/vop3.s | ||
---|---|---|
363 ↗ | (On Diff #70537) | If I change it to: It failed with the following error: /llvm/test/MC/AMDGPU/vop3.s:362:1: error: instruction not supported on this GPU |
test/MC/AMDGPU/vop3.s | ||
---|---|---|
363 ↗ | (On Diff #70537) | You need to use a CI specific checkline |
test/MC/AMDGPU/vop3.s | ||
---|---|---|
4 ↗ | (On Diff #70872) | tonga is not CI |