[llvm-bugs] [Bug 43473] New: loop-interchange crashes: Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible type!"' failed.

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Sep 26 19:01:49 PDT 2019


https://bugs.llvm.org/show_bug.cgi?id=43473

            Bug ID: 43473
           Summary: loop-interchange crashes: Assertion `isa<X>(Val) &&
                    "cast<Ty>() argument of incompatible type!"' failed.
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Scalar Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: cszide at 163.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 22585
  --> https://bugs.llvm.org/attachment.cgi?id=22585&action=edit
bugpoint-reduced-simplified.bc

$clang -v
clang version 10.0.0 (trunk 372974)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.5.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.5.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.4.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.4.0
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64

$opt bugpoint-reduced-simplified.bc -loop-interchange
WARNING: You're attempting to print out a bitcode file.
This is inadvisable as it may cause display problems. If
you REALLY want to taste LLVM bitcode first-hand, you
can force output with the `-f' option.

opt:
/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/include/llvm/Support/Casting.h:264:
typename llvm::cast_retty<X, Y*>::ret_type llvm::cast(Y*) [with X =
llvm::PHINode; Y = llvm::User; typename llvm::cast_retty<X, Y*>::ret_type =
llvm::PHINode*]: Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible
type!"' failed.
Stack dump:
0.      Program arguments:
/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/opt
bugpoint-reduced-simplified.bc -loop-interchange 
1.      Running pass 'Function Pass Manager' on module
'bugpoint-reduced-simplified.bc'.
2.      Running pass 'Loop Pass Manager' on function '@kernel_gemver'
3.      Running pass 'Interchanges loops for cache reuse' on basic block
'%for.body25.us'
 #0 0x0000562006557baa llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/opt+0x2783baa)
 #1 0x0000562006555884 llvm::sys::RunSignalHandlers()
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/opt+0x2781884)
 #2 0x00005620065559c2 SignalHandler(int)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/opt+0x27819c2)
 #3 0x00007fcbf96f9890 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x12890)
 #4 0x00007fcbf83abe97 raise
/build/glibc-OTsEL5/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:51:0
 #5 0x00007fcbf83ad801 abort /build/glibc-OTsEL5/glibc-2.27/stdlib/abort.c:81:0
 #6 0x00007fcbf839d39a __assert_fail_base
/build/glibc-OTsEL5/glibc-2.27/assert/assert.c:89:0
 #7 0x00007fcbf839d412 (/lib/x86_64-linux-gnu/libc.so.6+0x30412)
 #8 0x000056200634abd6 (anonymous
namespace)::LoopInterchangeTransform::transform()
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/opt+0x2576bd6)
 #9 0x000056200634df95 (anonymous
namespace)::LoopInterchange::processLoopList(llvm::SmallVector<llvm::Loop*,
8u>)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/opt+0x2579f95)
#10 0x000056200634ebdd (anonymous
namespace)::LoopInterchange::runOnLoop(llvm::Loop*, llvm::LPPassManager&)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/opt+0x257abdd)
#11 0x000056200582862b llvm::LPPassManager::runOnFunction(llvm::Function&)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/opt+0x1a5462b)
#12 0x0000562005e96209 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/opt+0x20c2209)
#13 0x0000562005e96301 llvm::FPPassManager::runOnModule(llvm::Module&)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/opt+0x20c2301)
#14 0x0000562005e95461 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/opt+0x20c1461)
#15 0x0000562004665b4f main
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/opt+0x891b4f)
#16 0x00007fcbf838eb97 __libc_start_main
/build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:344:0
#17 0x00005620046ddc7a _start
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/opt+0x909c7a)
Aborted (core dumped)

--------------------------------------------------
; ModuleID = 'bugpoint-reduced-simplified.bc'
source_filename = "llvm-link"
target datalayout =
"e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

define dso_local fastcc void @kernel_gemver() unnamed_addr #0 {
entry:
  br label %for.body25.us

for.body25.us:                                    ; preds =
%for.cond26.for.end44_crit_edge.us, %entry
  %indvars.iv28.us = phi i64 [ undef, %entry ], [ %indvars.iv.next29.us,
%for.cond26.for.end44_crit_edge.us ]
  %arrayidx30.us = getelementptr inbounds double, double* undef, i64
%indvars.iv28.us
  br label %for.body28.us

for.body28.us:                                    ; preds = %for.body28.us,
%for.body25.us
  %indvars.iv26.us = phi i64 [ 0, %for.body25.us ], [ %indvars.iv.next27.us,
%for.body28.us ]
  %0 = load double, double* %arrayidx30.us, align 8, !tbaa !1
  store double undef, double* %arrayidx30.us, align 8, !tbaa !1
  %indvars.iv.next27.us = add nuw nsw i64 %indvars.iv26.us, 1
  br i1 undef, label %for.body28.us, label %for.cond26.for.end44_crit_edge.us

for.cond26.for.end44_crit_edge.us:                ; preds = %for.body28.us
  %inc43.lcssa.wide.us = phi i64 [ %indvars.iv.next27.us, %for.body28.us ]
  %1 = trunc i64 %inc43.lcssa.wide.us to i32
  %indvars.iv.next29.us = add nsw i64 %indvars.iv28.us, 1
  br i1 undef, label %for.body25.us, label
%for.cond23.for.end47_crit_edge.us-lcssa.us

for.cond23.for.end47_crit_edge.us-lcssa.us:       ; preds =
%for.cond26.for.end44_crit_edge.us
  unreachable
}

attributes #0 = { "use-soft-float"="false" }

!llvm.module.flags = !{!0}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!2, !2, i64 0}
!2 = !{!"double", !3, i64 0}
!3 = !{!"omnipotent char", !4, i64 0}
!4 = !{!"Simple C/C++ TBAA"}

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190927/e2a00d54/attachment.html>


More information about the llvm-bugs mailing list