mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-20 16:17:38 +00:00
Fix PR16571, which is a bug in the code that checks that all of the types in the bundle are uniform.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185970 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -172,7 +172,7 @@ static unsigned getSameOpcode(ArrayRef<Value *> VL) {
|
||||
static Type* getSameType(ArrayRef<Value *> VL) {
|
||||
Type *Ty = VL[0]->getType();
|
||||
for (int i = 1, e = VL.size(); i < e; i++)
|
||||
if (VL[0]->getType() != Ty)
|
||||
if (VL[i]->getType() != Ty)
|
||||
return 0;
|
||||
|
||||
return Ty;
|
||||
@@ -389,6 +389,8 @@ private:
|
||||
|
||||
void BoUpSLP::buildTree(ArrayRef<Value *> Roots) {
|
||||
deleteTree();
|
||||
if (!getSameType(Roots))
|
||||
return;
|
||||
buildTree_rec(Roots, 0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user