-
Notifications
You must be signed in to change notification settings - Fork 15.3k
Closed
Labels
Description
Looks like maybe it used to change opcodes at some point in the past, but no longer does?
llvm-project/llvm/lib/IR/Instructions.cpp
Lines 2703 to 2712 in 070e129
| // 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; | |
| } |