mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-10 20:33:15 +00:00
Remove no-op check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76302 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1694e095c0
commit
191a0aee4f
@ -8453,8 +8453,7 @@ Instruction *InstCombiner::visitTrunc(TruncInst &CI) {
|
||||
uint32_t SrcBitWidth = Src->getType()->getScalarSizeInBits();
|
||||
|
||||
// Canonicalize trunc x to i1 -> (icmp ne (and x, 1), 0)
|
||||
if (DestBitWidth == 1 &&
|
||||
isa<VectorType>(Ty) == isa<VectorType>(Src->getType())) {
|
||||
if (DestBitWidth == 1) {
|
||||
Constant *One = Context->getConstantInt(Src->getType(), 1);
|
||||
Src = InsertNewInstBefore(BinaryOperator::CreateAnd(Src, One, "tmp"), CI);
|
||||
Value *Zero = Context->getNullValue(Src->getType());
|
||||
|
Loading…
x
Reference in New Issue
Block a user