mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-02 07:32:52 +00:00
shift intrinsic operand
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101423 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c447207264
commit
8db3f2c2ab
@ -559,7 +559,7 @@ bool CodeGenPrepare::OptimizeCallInst(CallInst *CI) {
|
||||
// Lower all uses of llvm.objectsize.*
|
||||
IntrinsicInst *II = dyn_cast<IntrinsicInst>(CI);
|
||||
if (II && II->getIntrinsicID() == Intrinsic::objectsize) {
|
||||
bool Min = (cast<ConstantInt>(II->getOperand(2))->getZExtValue() == 1);
|
||||
bool Min = (cast<ConstantInt>(II->getOperand(1))->getZExtValue() == 1);
|
||||
const Type *ReturnTy = CI->getType();
|
||||
Constant *RetVal = ConstantInt::get(ReturnTy, Min ? 0 : -1ULL);
|
||||
CI->replaceAllUsesWith(RetVal);
|
||||
|
Loading…
Reference in New Issue
Block a user