projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Don't use a potentially expensive shift if all we want is one set bit.
[oota-llvm.git]
/
lib
/
Target
/
R600
/
SIInsertWaits.cpp
diff --git
a/lib/Target/R600/SIInsertWaits.cpp
b/lib/Target/R600/SIInsertWaits.cpp
index c36e1dc3041341b12df7f52314d2a26c75b6b8ea..d31da4585ffeff1db10efa580404afedb9380caa 100644
(file)
--- a/
lib/Target/R600/SIInsertWaits.cpp
+++ b/
lib/Target/R600/SIInsertWaits.cpp
@@
-134,6
+134,8
@@
Counters SIInsertWaits::getHwCounts(MachineInstr &MI) {
if (TSFlags & SIInstrFlags::LGKM_CNT) {
MachineOperand &Op = MI.getOperand(0);
+ if (!Op.isReg())
+ Op = MI.getOperand(1);
assert(Op.isReg() && "First LGKM operand must be a register!");
unsigned Reg = Op.getReg();