https://llvm.org/bugs/show_bug.cgi?id=27617
Bug ID: 27617 Summary: SLPVectorizer asserts in buildtree_rec Product: libraries Version: trunk Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: Loop Optimizer Assignee: unassignedb...@nondot.org Reporter: jesper.antons...@ericsson.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified Created attachment 16298 --> https://llvm.org/bugs/attachment.cgi?id=16298&action=edit minimal llvm assembly language file that triggers the assert For the attached ll code example and the invocation: ./build-all/bin/opt -S -mcpu=x86-64 -mtriple=x86_64-linux -indvars -slp-vectorizer -O1 -o /dev/null foo.opt.ll I get this assert: opt: ../lib/Transforms/Vectorize/SLPVectorizer.cpp:1005: void (anonymous namespace)::BoUpSLP::buildTree_rec(ArrayRef<llvm::Value *>, unsigned int): Assertion `SameTy && "Invalid types!"' failed. The problem is that two getelementpointer indicies have differing types. Both have the value 4, but one is of i16 type and one is i64. The recursive call to gather those values fails with an assert because the types differ. The simplest fix might be to change the assert to allow this. Something like this: - bool SameTy = getSameType(VL); (void)SameTy; + bool SameTy = allConstant(VL) || getSameType(VL); (void)SameTy; -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs