diff options
| author | Daniel Berlin <dberlin@dberlin.org> | 2017-02-12 23:24:42 +0000 |
|---|---|---|
| committer | Daniel Berlin <dberlin@dberlin.org> | 2017-02-12 23:24:42 +0000 |
| commit | 508a1dec94584826e0e21eae8e8be5b15e2f8edb (patch) | |
| tree | 196d77075912a8f37ac1338b58084f32cd524f1c | |
| parent | 0557a44287f4796707323e22732ebed9c3f7b905 (diff) | |
| download | bcm5719-llvm-508a1dec94584826e0e21eae8e8be5b15e2f8edb.tar.gz bcm5719-llvm-508a1dec94584826e0e21eae8e8be5b15e2f8edb.zip | |
NewGVN: Use shouldSwapOperands in one more place
llvm-svn: 294925
| -rw-r--r-- | llvm/lib/Transforms/Scalar/NewGVN.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/NewGVN.cpp b/llvm/lib/Transforms/Scalar/NewGVN.cpp index 99203368664..25455c75b4e 100644 --- a/llvm/lib/Transforms/Scalar/NewGVN.cpp +++ b/llvm/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); } |

