reference, declaration → definition definition → references, declarations, derived classes, virtual overrides reference to multiple definitions → definitions unreferenced |
314 Instruction::BinaryOps Opcode = I.getOpcode(); 321 if (I.isCommutative() && getComplexity(I.getOperand(0)) < 321 if (I.isCommutative() && getComplexity(I.getOperand(0)) < 322 getComplexity(I.getOperand(1))) 323 Changed = !I.swapOperands(); 325 BinaryOperator *Op0 = dyn_cast<BinaryOperator>(I.getOperand(0)); 326 BinaryOperator *Op1 = dyn_cast<BinaryOperator>(I.getOperand(1)); 328 if (I.isAssociative()) { 333 Value *C = I.getOperand(1); 336 if (Value *V = SimplifyBinOp(Opcode, B, C, SQ.getWithInstruction(&I))) { 338 I.setOperand(0, A); 339 I.setOperand(1, V); 340 bool IsNUW = hasNoUnsignedWrap(I) && hasNoUnsignedWrap(*Op0); 341 bool IsNSW = maintainNoSignedWrap(I, B, C) && hasNoSignedWrap(*Op0); 346 ClearSubclassDataAfterReassociation(I); 351 I.setHasNoUnsignedWrap(true); 354 I.setHasNoSignedWrap(true); 364 Value *A = I.getOperand(0); 369 if (Value *V = SimplifyBinOp(Opcode, A, B, SQ.getWithInstruction(&I))) { 371 I.setOperand(0, V); 372 I.setOperand(1, C); 375 ClearSubclassDataAfterReassociation(I); 383 if (I.isAssociative() && I.isCommutative()) { 383 if (I.isAssociative() && I.isCommutative()) { 384 if (simplifyAssocCastAssoc(&I)) { 394 Value *C = I.getOperand(1); 397 if (Value *V = SimplifyBinOp(Opcode, C, A, SQ.getWithInstruction(&I))) { 399 I.setOperand(0, V); 400 I.setOperand(1, B); 403 ClearSubclassDataAfterReassociation(I); 412 Value *A = I.getOperand(0); 417 if (Value *V = SimplifyBinOp(Opcode, C, A, SQ.getWithInstruction(&I))) { 419 I.setOperand(0, B); 420 I.setOperand(1, V); 423 ClearSubclassDataAfterReassociation(I); 438 bool IsNUW = hasNoUnsignedWrap(I) && 446 FastMathFlags Flags = I.getFastMathFlags(); 451 InsertNewInstWith(NewBO, I); 453 I.setOperand(0, NewBO); 454 I.setOperand(1, ConstantExpr::get(Opcode, C1, C2)); 457 ClearSubclassDataAfterReassociation(I); 459 I.setHasNoUnsignedWrap(true);