mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-20 17:03:09 +00:00
Fix a bug in foldSelectICmpAndOr.
Differences in bitwidth between X and Y could exist even if C1 and C2 have the same Log2 representation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180779 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
62d77858be
commit
527db3f26b
@ -401,7 +401,8 @@ static Value *foldSelectICmpAndOr(const SelectInst &SI, Value *TrueVal,
|
||||
} else if (C1Log > C2Log) {
|
||||
V = Builder->CreateLShr(V, C1Log - C2Log);
|
||||
V = Builder->CreateZExtOrTrunc(V, Y->getType());
|
||||
}
|
||||
} else
|
||||
V = Builder->CreateZExtOrTrunc(V, Y->getType());
|
||||
|
||||
ICmpInst::Predicate Pred = IC->getPredicate();
|
||||
if ((Pred == ICmpInst::ICMP_NE && OrOnFalseVal) ||
|
||||
|
Loading…
x
Reference in New Issue
Block a user