mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-18 13:34:04 +00:00
use ArgOperand API
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107017 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
30d2577f64
commit
a90c5c7605
@ -197,7 +197,7 @@ Instruction *InstCombiner::SimplifyMemTransfer(MemIntrinsic *MI) {
|
|||||||
*MI);
|
*MI);
|
||||||
|
|
||||||
// Set the size of the copy to 0, it will be deleted on the next iteration.
|
// Set the size of the copy to 0, it will be deleted on the next iteration.
|
||||||
MI->setOperand(3, Constant::getNullValue(MemOpLength->getType()));
|
MI->setArgOperand(2, Constant::getNullValue(MemOpLength->getType()));
|
||||||
return MI;
|
return MI;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -513,11 +513,11 @@ Instruction *InstCombiner::visitCallInst(CallInst &CI) {
|
|||||||
// FALL THROUGH uadd into sadd
|
// FALL THROUGH uadd into sadd
|
||||||
case Intrinsic::sadd_with_overflow:
|
case Intrinsic::sadd_with_overflow:
|
||||||
// Canonicalize constants into the RHS.
|
// Canonicalize constants into the RHS.
|
||||||
if (isa<Constant>(II->getOperand(1)) &&
|
if (isa<Constant>(II->getArgOperand(0)) &&
|
||||||
!isa<Constant>(II->getOperand(2))) {
|
!isa<Constant>(II->getArgOperand(1))) {
|
||||||
Value *LHS = II->getOperand(1);
|
Value *LHS = II->getArgOperand(0);
|
||||||
II->setOperand(1, II->getOperand(2));
|
II->setArgOperand(0, II->getArgOperand(1));
|
||||||
II->setOperand(2, LHS);
|
II->setArgOperand(1, LHS);
|
||||||
return II;
|
return II;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -560,11 +560,11 @@ Instruction *InstCombiner::visitCallInst(CallInst &CI) {
|
|||||||
case Intrinsic::umul_with_overflow:
|
case Intrinsic::umul_with_overflow:
|
||||||
case Intrinsic::smul_with_overflow:
|
case Intrinsic::smul_with_overflow:
|
||||||
// Canonicalize constants into the RHS.
|
// Canonicalize constants into the RHS.
|
||||||
if (isa<Constant>(II->getOperand(1)) &&
|
if (isa<Constant>(II->getArgOperand(0)) &&
|
||||||
!isa<Constant>(II->getOperand(2))) {
|
!isa<Constant>(II->getArgOperand(1))) {
|
||||||
Value *LHS = II->getOperand(1);
|
Value *LHS = II->getArgOperand(0);
|
||||||
II->setOperand(1, II->getOperand(2));
|
II->setArgOperand(0, II->getArgOperand(1));
|
||||||
II->setOperand(2, LHS);
|
II->setArgOperand(1, LHS);
|
||||||
return II;
|
return II;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -632,7 +632,7 @@ Instruction *InstCombiner::visitCallInst(CallInst &CI) {
|
|||||||
APInt UndefElts(VWidth, 0);
|
APInt UndefElts(VWidth, 0);
|
||||||
if (Value *V = SimplifyDemandedVectorElts(II->getArgOperand(0), DemandedElts,
|
if (Value *V = SimplifyDemandedVectorElts(II->getArgOperand(0), DemandedElts,
|
||||||
UndefElts)) {
|
UndefElts)) {
|
||||||
II->setOperand(1, V);
|
II->setArgOperand(0, V);
|
||||||
return II;
|
return II;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user