Akira Hatanaka
2012-Dec-21 21:49 UTC
[LLVMdev] assert in InnerLoopVectorizer::createEmptyLoop
I am seeing an assert when I compile the attached program with clang: $ clang -fno-strict-aliasing -target mips64el-unknown-linux -O3 -fomit-frame-pointer -S test1.c -o test1.ll -emit-llvm It asserts when LoopVectorize.cpp:506 is executed. It looks like it is complaining because it is trying to zero-extend an i64 (type Count->getType() returns i64) to an i32 (IdxTy). if (Count->getType() != IdxTy) { // The exit count can be of pointer type. Convert it to the correct // integer type. if (ExitCount->getType()->isPointerTy()) Count = CastInst::CreatePointerCast(Count, IdxTy, "ptrcnt.to.int", Loc); else Count = CastInst::CreateZExtOrBitCast(Count, IdxTy, "zext.cnt", Loc); // <= this line } -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121221/9d60cfb0/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: test1.c Type: text/x-csrc Size: 504 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121221/9d60cfb0/attachment.c>
Chandler Carruth
2012-Dec-21 21:53 UTC
[LLVMdev] assert in InnerLoopVectorizer::createEmptyLoop
Please file a bug for these types of issues. On Fri, Dec 21, 2012 at 1:49 PM, Akira Hatanaka <ahatanak at gmail.com> wrote:> I am seeing an assert when I compile the attached program with clang: > > $ clang -fno-strict-aliasing -target mips64el-unknown-linux -O3 > -fomit-frame-pointer -S test1.c -o test1.ll -emit-llvm > > > It asserts when LoopVectorize.cpp:506 is executed. It looks like it is > complaining because it is trying to zero-extend an i64 (type > Count->getType() returns i64) to an i32 (IdxTy). > > if (Count->getType() != IdxTy) { > // The exit count can be of pointer type. Convert it to the correct > // integer type. > if (ExitCount->getType()->isPointerTy()) > Count = CastInst::CreatePointerCast(Count, IdxTy, "ptrcnt.to.int", > Loc); > else > Count = CastInst::CreateZExtOrBitCast(Count, IdxTy, "zext.cnt", > Loc); // <= this line > } > > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121221/b964f39e/attachment.html>
Akira Hatanaka
2012-Dec-21 21:58 UTC
[LLVMdev] assert in InnerLoopVectorizer::createEmptyLoop
I filed a bug (14692). Please take a look. On Fri, Dec 21, 2012 at 1:53 PM, Chandler Carruth <chandlerc at google.com>wrote:> Please file a bug for these types of issues. > > > On Fri, Dec 21, 2012 at 1:49 PM, Akira Hatanaka <ahatanak at gmail.com>wrote: > >> I am seeing an assert when I compile the attached program with clang: >> >> $ clang -fno-strict-aliasing -target mips64el-unknown-linux -O3 >> -fomit-frame-pointer -S test1.c -o test1.ll -emit-llvm >> >> >> It asserts when LoopVectorize.cpp:506 is executed. It looks like it is >> complaining because it is trying to zero-extend an i64 (type >> Count->getType() returns i64) to an i32 (IdxTy). >> >> if (Count->getType() != IdxTy) { >> // The exit count can be of pointer type. Convert it to the correct >> // integer type. >> if (ExitCount->getType()->isPointerTy()) >> Count = CastInst::CreatePointerCast(Count, IdxTy, "ptrcnt.to.int", >> Loc); >> else >> Count = CastInst::CreateZExtOrBitCast(Count, IdxTy, "zext.cnt", >> Loc); // <= this line >> } >> >> >> >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >> >> >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121221/16678ad4/attachment.html>