projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
353dea2
)
Another situation where ROTR is cheaper than ROTL.
author
Bill Wendling
<isanbard@gmail.com>
Sun, 31 Aug 2008 01:13:31 +0000
(
01:13
+0000)
committer
Bill Wendling
<isanbard@gmail.com>
Sun, 31 Aug 2008 01:13:31 +0000
(
01:13
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55577
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
patch
|
blob
|
history
diff --git
a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 2521609f5b60f1cbab4e2d4cccd16183d6c2c978..e414fdfa7ab4bcc2e38b47c82db1b098b0370cc8 100644
(file)
--- a/
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@
-2044,10
+2044,10
@@
SDNode *DAGCombiner::MatchRotate(SDValue LHS, SDValue RHS) {
if (ConstantSDNode *SUBC =
dyn_cast<ConstantSDNode>(LHSShiftAmt.getOperand(0))) {
if (SUBC->getAPIntValue() == OpSizeInBits) {
- if (HasROTL)
- return DAG.getNode(ISD::ROTL, VT, LHSShiftArg, LHSShiftAmt).getNode();
- else
+ if (HasROTR)
return DAG.getNode(ISD::ROTR, VT, LHSShiftArg, RHSShiftAmt).getNode();
+ else
+ return DAG.getNode(ISD::ROTL, VT, LHSShiftArg, LHSShiftAmt).getNode();
}
}
}