projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
AMDGPU/SI: The SIShrinkInstructions pass should only fold immediates with one use
[oota-llvm.git]
/
lib
/
Target
/
AMDGPU
/
SIShrinkInstructions.cpp
diff --git
a/lib/Target/AMDGPU/SIShrinkInstructions.cpp
b/lib/Target/AMDGPU/SIShrinkInstructions.cpp
index 51e72cdb5f9ed289b5ed585f5c93e5cbeebe2d81..cb9d7f7c59dbf59cfd40d2061e23d9bcdf04b98b 100644
(file)
--- a/
lib/Target/AMDGPU/SIShrinkInstructions.cpp
+++ b/
lib/Target/AMDGPU/SIShrinkInstructions.cpp
@@
-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()) {