Skip to content

BinaryOperator::swapOperands comment is out of date in implementation #125438

@scottmcm

Description

@scottmcm

Looks like maybe it used to change opcodes at some point in the past, but no longer does?

// Exchange the two operands to this instruction. This instruction is safe to
// use on any binary instruction and does not modify the semantics of the
// instruction. If the instruction is order-dependent (SetLT f.e.), the opcode
// is changed.
bool BinaryOperator::swapOperands() {
if (!isCommutative())
return true; // Can't commute operands
Op<0>().swap(Op<1>());
return false;
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions