Skip to content

Instantly share code, notes, and snippets.

@nlw0
Last active Apr 22, 2019
Embed
What would you like to do?
Julia-LLVM minimum vectorization failure gdb log
LV: Checking a loop in "julia_myfun_15965" from simdloop.jl:75 @[ /home/user/src/vectest/vectest-f.jl:6 ]
LV: Loop hints: force=? width=0 unroll=0
LV: Found a loop: L88
Thread 1 "julia-debug" hit Breakpoint 1, (anonymous namespace)::LoopVectorizationLegality::canVectorizeInstrs (this=this@entry=0x7fffffffaa70)
at /home/user/src/fork/julia/deps/srccache/llvm-6.0.1/lib/Transforms/Vectorize/LoopVectorize.cpp:5266
5266 bool LoopVectorizationLegality::canVectorizeInstrs() {
(gdb) n
5267 BasicBlock *Header = TheLoop->getHeader();
(gdb)
5266 bool LoopVectorizationLegality::canVectorizeInstrs() {
(gdb)
5267 BasicBlock *Header = TheLoop->getHeader();
(gdb)
5272 F.getFnAttribute("no-nans-fp-math").getValueAsString() == "true";
(gdb)
5275 for (BasicBlock *BB : TheLoop->blocks()) {
(gdb)
5271 HasFunNoNaNAttr =
(gdb)
5275 for (BasicBlock *BB : TheLoop->blocks()) {
(gdb)
5322 InductionDescriptor ID;
(gdb)
5275 for (BasicBlock *BB : TheLoop->blocks()) {
(gdb)
5277 for (Instruction &I : *BB) {
(gdb)
5317 Reductions[Phi] = RedDes;
(gdb)
5311 RecurrenceDescriptor RedDes;
(gdb)
5317 Reductions[Phi] = RedDes;
(gdb)
5277 for (Instruction &I : *BB) {
(gdb)
5278 if (auto *Phi = dyn_cast<PHINode>(&I)) {
(gdb)
5277 for (Instruction &I : *BB) {
(gdb)
5278 if (auto *Phi = dyn_cast<PHINode>(&I)) {
(gdb)
5277 for (Instruction &I : *BB) {
(gdb)
5278 if (auto *Phi = dyn_cast<PHINode>(&I)) {
(gdb)
5281 if (!PhiTy->isIntegerTy() && !PhiTy->isFloatingPointTy() &&
(gdb)
5292 if (BB != Header) {
(gdb)
5304 if (Phi->getNumIncomingValues() != 2) {
(gdb)
5311 RecurrenceDescriptor RedDes;
(gdb)
5312 if (RecurrenceDescriptor::isReductionPHI(Phi, TheLoop, RedDes, DB, AC,
(gdb)
5322 InductionDescriptor ID;
(gdb)
5323 if (InductionDescriptor::isInductionPHI(Phi, TheLoop, PSE, ID)) {
(gdb)
5324 addInductionPhi(Phi, ID, AllowedExit);
(gdb)
LV: Found an induction variable.
5325 if (ID.hasUnsafeAlgebra() && !HasFunNoNaNAttr)
(gdb)
5327 DEBUG(dbgs() << "LV: Matched if 2 " << *Phi << "\n");
(gdb)
LV: Matched if 2 %value_phi317 = phi i64 [ 0, %L88.lr.ph ], [ %49, %L88 ]
5328 continue;
(gdb)
5319 continue;
(gdb)
5277 for (Instruction &I : *BB) {
(gdb)
5278 if (auto *Phi = dyn_cast<PHINode>(&I)) {
(gdb)
5277 for (Instruction &I : *BB) {
(gdb)
5278 if (auto *Phi = dyn_cast<PHINode>(&I)) {
(gdb)
5281 if (!PhiTy->isIntegerTy() && !PhiTy->isFloatingPointTy() &&
(gdb)
5292 if (BB != Header) {
(gdb)
5304 if (Phi->getNumIncomingValues() != 2) {
(gdb)
5311 RecurrenceDescriptor RedDes;
(gdb)
5312 if (RecurrenceDescriptor::isReductionPHI(Phi, TheLoop, RedDes, DB, AC,
(gdb)
5322 InductionDescriptor ID;
(gdb)
5323 if (InductionDescriptor::isInductionPHI(Phi, TheLoop, PSE, ID)) {
(gdb)
5322 InductionDescriptor ID;
(gdb)
5323 if (InductionDescriptor::isInductionPHI(Phi, TheLoop, PSE, ID)) {
(gdb)
5331 if (RecurrenceDescriptor::isFirstOrderRecurrence(Phi, TheLoop,
(gdb)
5340 if (InductionDescriptor::isInductionPHI(Phi, TheLoop, PSE, ID, true)) {
(gdb)
5346 ORE->emit(createMissedAnalysis("NonReductionValueUsedOutsideLoop", Phi)
(gdb)
5348 "reduction is used outside the loop");
(gdb)
5346 ORE->emit(createMissedAnalysis("NonReductionValueUsedOutsideLoop", Phi)
(gdb)
remark: simdloop.jl:75:0: loop not vectorized: value that could not be identified as reduction is used outside the loop
5349 DEBUG(dbgs() << "LV: Found an unidentified PHI." << *Phi << "\n");
(gdb)
LV: Checking a loop in "julia_myfun_15961" from simdloop.jl:75 @[ /home/user/src/vectest/vectest-i.jl:4 ]
LV: Loop hints: force=? width=0 unroll=0
LV: Found a loop: L88
Thread 1 "julia-debug" hit Breakpoint 1, (anonymous namespace)::LoopVectorizationLegality::canVectorizeInstrs (this=this@entry=0x7fffffffaa70)
at /home/user/src/fork/julia/deps/srccache/llvm-6.0.1/lib/Transforms/Vectorize/LoopVectorize.cpp:5266
5266 bool LoopVectorizationLegality::canVectorizeInstrs() {
(gdb) n
5267 BasicBlock *Header = TheLoop->getHeader();
(gdb)
5266 bool LoopVectorizationLegality::canVectorizeInstrs() {
(gdb)
5267 BasicBlock *Header = TheLoop->getHeader();
(gdb)
5272 F.getFnAttribute("no-nans-fp-math").getValueAsString() == "true";
(gdb)
5275 for (BasicBlock *BB : TheLoop->blocks()) {
(gdb)
5271 HasFunNoNaNAttr =
(gdb)
5275 for (BasicBlock *BB : TheLoop->blocks()) {
(gdb)
5322 InductionDescriptor ID;
(gdb)
5275 for (BasicBlock *BB : TheLoop->blocks()) {
(gdb)
5277 for (Instruction &I : *BB) {
(gdb)
5317 Reductions[Phi] = RedDes;
(gdb)
5311 RecurrenceDescriptor RedDes;
(gdb)
5317 Reductions[Phi] = RedDes;
(gdb)
5277 for (Instruction &I : *BB) {
(gdb)
5278 if (auto *Phi = dyn_cast<PHINode>(&I)) {
(gdb)
5277 for (Instruction &I : *BB) {
(gdb)
5278 if (auto *Phi = dyn_cast<PHINode>(&I)) {
(gdb)
5281 if (!PhiTy->isIntegerTy() && !PhiTy->isFloatingPointTy() &&
(gdb)
5292 if (BB != Header) {
(gdb)
5304 if (Phi->getNumIncomingValues() != 2) {
(gdb)
5311 RecurrenceDescriptor RedDes;
(gdb)
5312 if (RecurrenceDescriptor::isReductionPHI(Phi, TheLoop, RedDes, DB, AC,
(gdb)
5322 InductionDescriptor ID;
(gdb)
5323 if (InductionDescriptor::isInductionPHI(Phi, TheLoop, PSE, ID)) {
(gdb)
5322 InductionDescriptor ID;
(gdb)
5323 if (InductionDescriptor::isInductionPHI(Phi, TheLoop, PSE, ID)) {
(gdb)
5324 addInductionPhi(Phi, ID, AllowedExit);
(gdb)
LV: Found an induction variable.
5325 if (ID.hasUnsafeAlgebra() && !HasFunNoNaNAttr)
(gdb)
5327 DEBUG(dbgs() << "LV: Matched if 2 " << *Phi << "\n");
(gdb)
LV: Matched if 2 %value_phi317 = phi i64 [ 0, %L88.lr.ph ], [ %50, %L88 ]
5328 continue;
(gdb)
5319 continue;
(gdb)
5277 for (Instruction &I : *BB) {
(gdb)
5278 if (auto *Phi = dyn_cast<PHINode>(&I)) {
(gdb)
5277 for (Instruction &I : *BB) {
(gdb)
5278 if (auto *Phi = dyn_cast<PHINode>(&I)) {
(gdb)
5281 if (!PhiTy->isIntegerTy() && !PhiTy->isFloatingPointTy() &&
(gdb)
5292 if (BB != Header) {
(gdb)
5304 if (Phi->getNumIncomingValues() != 2) {
(gdb)
5311 RecurrenceDescriptor RedDes;
(gdb)
5312 if (RecurrenceDescriptor::isReductionPHI(Phi, TheLoop, RedDes, DB, AC,
(gdb)
5314 if (RedDes.hasUnsafeAlgebra())
(gdb)
5316 AllowedExit.insert(RedDes.getLoopExitInstr());
(gdb)
5317 Reductions[Phi] = RedDes;
(gdb)
5318 DEBUG(dbgs() << "LV: Matched if 1 " << *Phi << "\n");
(gdb)
LV: Matched if 1 %value_phi16 = phi i32 [ %6, %L88.lr.ph ], [ %49, %L88 ]
5319 continue;
(gdb)
5277 for (Instruction &I : *BB) {
(gdb)
5278 if (auto *Phi = dyn_cast<PHINode>(&I)) {
(gdb)
5277 for (Instruction &I : *BB) {
(gdb)
5278 if (auto *Phi = dyn_cast<PHINode>(&I)) {
(gdb)
5357 auto *CI = dyn_cast<CallInst>(&I);
(gdb)
5359 !isa<DbgInfoIntrinsic>(CI) &&
(gdb)
5357 auto *CI = dyn_cast<CallInst>(&I);
(gdb)
5359 !isa<DbgInfoIntrinsic>(CI) &&
(gdb)
5383 if ((!VectorType::isValidElementType(I.getType()) &&
(gdb)
5384 !I.getType()->isVoidTy()) ||
(gdb)
5393 if (auto *ST = dyn_cast<StoreInst>(&I)) {
(gdb)
5406 } else if (I.getType()->isFloatingPointTy() && (CI || I.isBinaryOp()) &&
(gdb)
5414 if (hasOutsideLoopUser(TheLoop, &I, AllowedExit)) {
(gdb)
5277 for (Instruction &I : *BB) {
(gdb)
5278 if (auto *Phi = dyn_cast<PHINode>(&I)) {
(gdb)
5357 auto *CI = dyn_cast<CallInst>(&I);
(gdb)
5359 !isa<DbgInfoIntrinsic>(CI) &&
(gdb)
5357 auto *CI = dyn_cast<CallInst>(&I);
(gdb)
5359 !isa<DbgInfoIntrinsic>(CI) &&
(gdb)
5383 if ((!VectorType::isValidElementType(I.getType()) &&
(gdb)
5384 !I.getType()->isVoidTy()) ||
(gdb)
5393 if (auto *ST = dyn_cast<StoreInst>(&I)) {
(gdb)
5406 } else if (I.getType()->isFloatingPointTy() && (CI || I.isBinaryOp()) &&
(gdb)
5414 if (hasOutsideLoopUser(TheLoop, &I, AllowedExit)) {
(gdb)
5277 for (Instruction &I : *BB) {
(gdb)
5278 if (auto *Phi = dyn_cast<PHINode>(&I)) {
(gdb)
5277 for (Instruction &I : *BB) {
(gdb)
5278 if (auto *Phi = dyn_cast<PHINode>(&I)) {
(gdb)
5357 auto *CI = dyn_cast<CallInst>(&I);
(gdb)
5359 !isa<DbgInfoIntrinsic>(CI) &&
(gdb)
5357 auto *CI = dyn_cast<CallInst>(&I);
(gdb)
5359 !isa<DbgInfoIntrinsic>(CI) &&
(gdb)
5383 if ((!VectorType::isValidElementType(I.getType()) &&
(gdb)
5384 !I.getType()->isVoidTy()) ||
(gdb)
5393 if (auto *ST = dyn_cast<StoreInst>(&I)) {
(gdb)
5406 } else if (I.getType()->isFloatingPointTy() && (CI || I.isBinaryOp()) &&
(gdb)
5414 if (hasOutsideLoopUser(TheLoop, &I, AllowedExit)) {
(gdb)
5277 for (Instruction &I : *BB) {
(gdb)
5278 if (auto *Phi = dyn_cast<PHINode>(&I)) {
(gdb)
5277 for (Instruction &I : *BB) {
(gdb)
5278 if (auto *Phi = dyn_cast<PHINode>(&I)) {
(gdb)
5357 auto *CI = dyn_cast<CallInst>(&I);
(gdb)
5359 !isa<DbgInfoIntrinsic>(CI) &&
(gdb)
5357 auto *CI = dyn_cast<CallInst>(&I);
(gdb)
5359 !isa<DbgInfoIntrinsic>(CI) &&
(gdb)
5383 if ((!VectorType::isValidElementType(I.getType()) &&
(gdb)
5384 !I.getType()->isVoidTy()) ||
(gdb)
5393 if (auto *ST = dyn_cast<StoreInst>(&I)) {
(gdb)
5406 } else if (I.getType()->isFloatingPointTy() && (CI || I.isBinaryOp()) &&
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment