diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2019-02-25 19:24:46 +0000 |
---|---|---|
committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2019-02-25 19:24:46 +0000 |
commit | fd6fd007739c66cf36d1bfe288b4a96f901a32fd (patch) | |
tree | 60ffa03ecf503a7767baded66ac24d7036361025 /llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp | |
parent | fcbd7f64953b04f42dd59f606e45dc8e88a27548 (diff) | |
download | bcm5719-llvm-fd6fd007739c66cf36d1bfe288b4a96f901a32fd.tar.gz bcm5719-llvm-fd6fd007739c66cf36d1bfe288b4a96f901a32fd.zip |
AMDGPU: Correct definitions for bitset instructions
These really read and write the result register, so these need a tied
input.
llvm-svn: 354809
Diffstat (limited to 'llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp')
-rw-r--r-- | llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp b/llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp index 2b1264d6f63..e589f60b583 100644 --- a/llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp +++ b/llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp @@ -276,7 +276,9 @@ static bool shrinkScalarLogicOp(const GCNSubtarget &ST, if (Opc == AMDGPU::S_BITSET0_B32 || Opc == AMDGPU::S_BITSET1_B32) { Src0->ChangeToImmediate(NewImm); - MI.RemoveOperand(2); + // Remove the immediate and add the tied input. + MI.getOperand(2).ChangeToRegister(Dest->getReg(), false); + MI.tieOperands(0, 2); } else { SrcImm->setImm(NewImm); } |