mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
Fix PR11948: the result type of an icmp may be a vector of boolean -
don't assume it is a boolean. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150247 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -476,6 +476,11 @@ static Value *ThreadCmpOverSelect(CmpInst::Predicate Pred, Value *LHS,
|
||||
// the original comparison.
|
||||
if (TCmp == FCmp)
|
||||
return TCmp;
|
||||
|
||||
// The remaining cases only make sense if the select condition has the same
|
||||
// type as the result of the comparison, so bail out if this is not so.
|
||||
if (Cond->getType()->isVectorTy() != RHS->getType()->isVectorTy())
|
||||
return 0;
|
||||
// If the false value simplified to false, then the result of the compare
|
||||
// is equal to "Cond && TCmp". This also catches the case when the false
|
||||
// value simplified to false and the true value to true, returning "Cond".
|
||||
|
Reference in New Issue
Block a user