]> granicus.if.org Git - llvm/commit
[InstCombine] Make InstCombiner::OptAndOp take a BinaryOperator instead of an Instruc...
authorCraig Topper <craig.topper@gmail.com>
Sun, 2 Apr 2017 17:57:30 +0000 (17:57 +0000)
committerCraig Topper <craig.topper@gmail.com>
Sun, 2 Apr 2017 17:57:30 +0000 (17:57 +0000)
commit9071ac1443ff6fd0417f42d89b887f7fe4b17e50
tree32224581f05027434e425258d42b15170d060b3e
parent07ccae240aafe2c732c47404a4e9d9dba6e4be78
[InstCombine] Make InstCombiner::OptAndOp take a BinaryOperator instead of an Instruction.

The callers have already performed the necessary cast before calling. This allows us to remove a comment that says the instruction must be a BinaryOperator and make it explicit in the argument type.

Had to add a default case to the switch because BinaryOperator::getOpcode() returns a BinaryOps enum.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299339 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
lib/Transforms/InstCombine/InstCombineInternal.h