mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-21 21:29:41 +00:00
AMDGPU/SI: The SIShrinkInstructions pass should only fold immediates with one use
This is convered by existing testcases and will be exposed by a future commit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241817 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e05910e677
commit
2b2d86178c
@ -149,7 +149,7 @@ static void foldImmediates(MachineInstr &MI, const SIInstrInfo *TII,
|
||||
return;
|
||||
|
||||
// Try to fold Src0
|
||||
if (Src0.isReg()) {
|
||||
if (Src0.isReg() && MRI.hasOneUse(Src0.getReg())) {
|
||||
unsigned Reg = Src0.getReg();
|
||||
MachineInstr *Def = MRI.getUniqueVRegDef(Reg);
|
||||
if (Def && Def->isMoveImmediate()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user