OSDN Git Service
(root)
/
android-x86
/
external-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
771a901
)
NewGVN: Use shouldSwapOperands in one more place
author
Daniel Berlin
<dberlin@dberlin.org>
Sun, 12 Feb 2017 23:24:42 +0000
(23:24 +0000)
committer
Daniel Berlin
<dberlin@dberlin.org>
Sun, 12 Feb 2017 23:24:42 +0000
(23:24 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294925
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/Scalar/NewGVN.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Scalar/NewGVN.cpp
b/lib/Transforms/Scalar/NewGVN.cpp
index
9920336
..
25455c7
100644
(file)
--- a/
lib/Transforms/Scalar/NewGVN.cpp
+++ b/
lib/Transforms/Scalar/NewGVN.cpp
@@
-571,7
+571,7
@@
const Expression *NewGVN::createExpression(Instruction *I) {
// numbers. Since all commutative instructions have two operands it is more
// efficient to sort by hand rather than using, say, std::sort.
assert(I->getNumOperands() == 2 && "Unsupported commutative instruction!");
- if (
E->getOperand(0) > E->getOperand(1
))
+ if (
shouldSwapOperands(E->getOperand(0), E->getOperand(1)
))
E->swapOperands(0, 1);
}