mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-01 01:14:12 +00:00
use ArgOperand API
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106737 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
916973706d
commit
3e84e2e90f
@ -732,10 +732,10 @@ Value *InstCombiner::SimplifyDemandedUseBits(Value *V, APInt DemandedMask,
|
|||||||
// the right place.
|
// the right place.
|
||||||
Instruction *NewVal;
|
Instruction *NewVal;
|
||||||
if (InputBit > ResultBit)
|
if (InputBit > ResultBit)
|
||||||
NewVal = BinaryOperator::CreateLShr(I->getOperand(1),
|
NewVal = BinaryOperator::CreateLShr(II->getArgOperand(0),
|
||||||
ConstantInt::get(I->getType(), InputBit-ResultBit));
|
ConstantInt::get(I->getType(), InputBit-ResultBit));
|
||||||
else
|
else
|
||||||
NewVal = BinaryOperator::CreateShl(I->getOperand(1),
|
NewVal = BinaryOperator::CreateShl(II->getArgOperand(0),
|
||||||
ConstantInt::get(I->getType(), ResultBit-InputBit));
|
ConstantInt::get(I->getType(), ResultBit-InputBit));
|
||||||
NewVal->takeName(I);
|
NewVal->takeName(I);
|
||||||
return InsertNewInstBefore(NewVal, *I);
|
return InsertNewInstBefore(NewVal, *I);
|
||||||
@ -1069,8 +1069,8 @@ Value *InstCombiner::SimplifyDemandedVectorElts(Value *V, APInt DemandedElts,
|
|||||||
case Intrinsic::x86_sse2_sub_sd:
|
case Intrinsic::x86_sse2_sub_sd:
|
||||||
case Intrinsic::x86_sse2_mul_sd:
|
case Intrinsic::x86_sse2_mul_sd:
|
||||||
// TODO: Lower MIN/MAX/ABS/etc
|
// TODO: Lower MIN/MAX/ABS/etc
|
||||||
Value *LHS = II->getOperand(1);
|
Value *LHS = II->getArgOperand(0);
|
||||||
Value *RHS = II->getOperand(2);
|
Value *RHS = II->getArgOperand(1);
|
||||||
// Extract the element as scalars.
|
// Extract the element as scalars.
|
||||||
LHS = InsertNewInstBefore(ExtractElementInst::Create(LHS,
|
LHS = InsertNewInstBefore(ExtractElementInst::Create(LHS,
|
||||||
ConstantInt::get(Type::getInt32Ty(I->getContext()), 0U)), *II);
|
ConstantInt::get(Type::getInt32Ty(I->getContext()), 0U)), *II);
|
||||||
|
Loading…
Reference in New Issue
Block a user