mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 04:30:23 +00:00
use getArgOperand instead of getOperand
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107271 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ad72e73136
commit
6f14c8c7c1
@ -1373,7 +1373,7 @@ void SROA::RewriteMemIntrinUserOfAlloca(MemIntrinsic *MI, Instruction *Inst,
|
|||||||
// If the stored element is zero (common case), just store a null
|
// If the stored element is zero (common case), just store a null
|
||||||
// constant.
|
// constant.
|
||||||
Constant *StoreVal;
|
Constant *StoreVal;
|
||||||
if (ConstantInt *CI = dyn_cast<ConstantInt>(MI->getOperand(2))) {
|
if (ConstantInt *CI = dyn_cast<ConstantInt>(MI->getArgOperand(1))) {
|
||||||
if (CI->isZero()) {
|
if (CI->isZero()) {
|
||||||
StoreVal = Constant::getNullValue(EltTy); // 0.0, null, 0, <0,0>
|
StoreVal = Constant::getNullValue(EltTy); // 0.0, null, 0, <0,0>
|
||||||
} else {
|
} else {
|
||||||
@ -1436,7 +1436,7 @@ void SROA::RewriteMemIntrinUserOfAlloca(MemIntrinsic *MI, Instruction *Inst,
|
|||||||
Value *Ops[] = {
|
Value *Ops[] = {
|
||||||
SROADest ? EltPtr : OtherElt, // Dest ptr
|
SROADest ? EltPtr : OtherElt, // Dest ptr
|
||||||
SROADest ? OtherElt : EltPtr, // Src ptr
|
SROADest ? OtherElt : EltPtr, // Src ptr
|
||||||
ConstantInt::get(MI->getOperand(3)->getType(), EltSize), // Size
|
ConstantInt::get(MI->getArgOperand(2)->getType(), EltSize), // Size
|
||||||
// Align
|
// Align
|
||||||
ConstantInt::get(Type::getInt32Ty(MI->getContext()), OtherEltAlign),
|
ConstantInt::get(Type::getInt32Ty(MI->getContext()), OtherEltAlign),
|
||||||
MI->getVolatileCst()
|
MI->getVolatileCst()
|
||||||
@ -1451,8 +1451,8 @@ void SROA::RewriteMemIntrinUserOfAlloca(MemIntrinsic *MI, Instruction *Inst,
|
|||||||
} else {
|
} else {
|
||||||
assert(isa<MemSetInst>(MI));
|
assert(isa<MemSetInst>(MI));
|
||||||
Value *Ops[] = {
|
Value *Ops[] = {
|
||||||
EltPtr, MI->getOperand(2), // Dest, Value,
|
EltPtr, MI->getArgOperand(1), // Dest, Value,
|
||||||
ConstantInt::get(MI->getOperand(3)->getType(), EltSize), // Size
|
ConstantInt::get(MI->getArgOperand(2)->getType(), EltSize), // Size
|
||||||
Zero, // Align
|
Zero, // Align
|
||||||
ConstantInt::get(Type::getInt1Ty(MI->getContext()), 0) // isVolatile
|
ConstantInt::get(Type::getInt1Ty(MI->getContext()), 0) // isVolatile
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user