mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 02:24:22 +00:00
back out r101423 and r101397, they break llvm-gcc self-host on darwin10
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101434 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1423,7 +1423,7 @@ Instruction *InstCombiner::visitICmpInstWithInstAndIntCst(ICmpInst &ICI,
|
||||
switch (II->getIntrinsicID()) {
|
||||
case Intrinsic::bswap:
|
||||
Worklist.Add(II);
|
||||
ICI.setOperand(0, II->getOperand(0));
|
||||
ICI.setOperand(0, II->getOperand(1));
|
||||
ICI.setOperand(1, ConstantInt::get(II->getContext(), RHSV.byteSwap()));
|
||||
return &ICI;
|
||||
case Intrinsic::ctlz:
|
||||
@ -1431,7 +1431,7 @@ Instruction *InstCombiner::visitICmpInstWithInstAndIntCst(ICmpInst &ICI,
|
||||
// ctz(A) == bitwidth(a) -> A == 0 and likewise for !=
|
||||
if (RHSV == RHS->getType()->getBitWidth()) {
|
||||
Worklist.Add(II);
|
||||
ICI.setOperand(0, II->getOperand(0));
|
||||
ICI.setOperand(0, II->getOperand(1));
|
||||
ICI.setOperand(1, ConstantInt::get(RHS->getType(), 0));
|
||||
return &ICI;
|
||||
}
|
||||
@ -1440,7 +1440,7 @@ Instruction *InstCombiner::visitICmpInstWithInstAndIntCst(ICmpInst &ICI,
|
||||
// popcount(A) == 0 -> A == 0 and likewise for !=
|
||||
if (RHS->isZero()) {
|
||||
Worklist.Add(II);
|
||||
ICI.setOperand(0, II->getOperand(0));
|
||||
ICI.setOperand(0, II->getOperand(1));
|
||||
ICI.setOperand(1, RHS);
|
||||
return &ICI;
|
||||
}
|
||||
|
Reference in New Issue
Block a user