Commit b64e0ceb by Nicolas Capens Committed by Nicolas Capens

Fix missing comparison operators.

The types can differ for many opcodes where the right-hand side is a constant, and this assert isn't that useful, so just remove the opcode checks. Bug chromium:805881 Change-Id: Ibcbda5123aaeaaf5753732d7cad4b5a3b331e963 Reviewed-on: https://swiftshader-review.googlesource.com/16730Tested-by: 's avatarNicolas Capens <nicolascapens@google.com> Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent 9b5aa709
......@@ -709,7 +709,7 @@ namespace sw
static Value *createArithmetic(Ice::InstArithmetic::OpKind op, Value *lhs, Value *rhs)
{
assert(lhs->getType() == rhs->getType() || (llvm::isa<Ice::Constant>(rhs) && (op == Ice::InstArithmetic::Shl || Ice::InstArithmetic::Lshr || Ice::InstArithmetic::Ashr)));
assert(lhs->getType() == rhs->getType() || llvm::isa<Ice::Constant>(rhs));
bool swapOperands = llvm::isa<Ice::Constant>(lhs) && isCommutative(op);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment