[llvm-bugs] [Bug 33491] New: [AArch64, Kryo] Assertion on atomic i128 load

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Jun 16 17:10:17 PDT 2017


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

            Bug ID: 33491
           Summary: [AArch64, Kryo] Assertion on atomic i128 load
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: GlobalISel
          Assignee: unassignedbugs at nondot.org
          Reporter: pirama at google.com
                CC: llvm-bugs at lists.llvm.org

The following IR causes llc to fail an assertion in 
TargetSchedModel::computeOperandLatency().  The same passes if CPU is set to
cortex-a73.

; ModuleID = 'bugpoint-reduced-simplified.bc'
source_filename = "bugpoint-output-226530e.bc"
target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
target triple = "aarch64--linux-android"

$foo = comdat any

; Function Attrs: alwaysinline nounwind sspstrong uwtable
define hidden void @foo() #0 comdat align 2 {
entry:
  %0 = load atomic i128, i128* undef monotonic, align 16
  ret void
}

attributes #0 = { alwaysinline nounwind sspstrong uwtable
"correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false"
"less-precise-fpmad"="false" "no-frame-pointer-elim"="true"
"no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false"
"no-jump-tables"="false" "no-nans-fp-math"="false"
"no-signed-zeros-fp-math"="false" "no-trapping-math"="false"
"stack-protector-buffer-size"="8" "target-cpu"="kryo"
"target-features"="+crc,+crypto,+neon" "unsafe-fp-math"="false"
"use-soft-float"="false" }

!llvm.ident = !{!0}

!0 = !{!"Android clang version 5.0.0  (based on LLVM 5.0.0svn)"}


Assertion:
=================
DefIdx 1 exceeds machine model writes for %vreg0<def>, %vreg1<def> = LDXPX
%vreg2<undef>; mem:Volatile LD16[undef] GPR64:%vreg0,%vreg1 GPR64sp:%vreg2
 (Try with MCSchedModel.CompleteModel set to false)incomplete machine model
UNREACHABLE executed at
/ssd1/pirama/llvm-upstream/llvm/lib/CodeGen/TargetSchedule.cpp:249!
#0 0x0000000001d7638a llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(bin/llc+0x1d7638a)
#1 0x0000000001d7443e llvm::sys::RunSignalHandlers() (bin/llc+0x1d7443e)
#2 0x0000000001d745a2 SignalHandler(int) (bin/llc+0x1d745a2)
#3 0x00007ff722295330 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x10330)
#4 0x00007ff72108dc37 gsignal
/build/eglibc-MjiXCM/eglibc-2.19/signal/../nptl/sysdeps/unix/sysv/linux/raise.c:56:0
#5 0x00007ff721091028 abort
/build/eglibc-MjiXCM/eglibc-2.19/stdlib/abort.c:91:0
#6 0x0000000001d261a5 (bin/llc+0x1d261a5)
#7 0x000000000175efe3
llvm::TargetSchedModel::computeOperandLatency(llvm::MachineInstr const*,
unsigned int, llvm::MachineInstr const*, unsigned int) const
(bin/llc+0x175efe3)
#8 0x00000000016f9344 llvm::ScheduleDAGInstrs::addVRegDefDeps(llvm::SUnit*,
unsigned int) (bin/llc+0x16f9344)
#9 0x00000000016fdd31
llvm::ScheduleDAGInstrs::buildSchedGraph(llvm::AAResults*,
llvm::RegPressureTracker*, llvm::PressureDiffs*, llvm::LiveIntervals*, bool)
(bin/llc+0x16fdd31)
#10 0x0000000001648e46 llvm::ScheduleDAGMILive::schedule() (bin/llc+0x1648e46)
#11 0x00000000016451de (anonymous
namespace)::MachineSchedulerBase::scheduleRegions(llvm::ScheduleDAGInstrs&,
bool) [clone .isra.548] (bin/llc+0x16451de)
#12 0x0000000001647d01 (anonymous
namespace)::MachineScheduler::runOnMachineFunction(llvm::MachineFunction&)
(bin/llc+0x1647d01)
#13 0x00000000015dffc5
llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (bin/llc+0x15dffc5)
#14 0x00000000018a2a43 llvm::FPPassManager::runOnFunction(llvm::Function&)
(bin/llc+0x18a2a43)
#15 0x00000000018a2aec llvm::FPPassManager::runOnModule(llvm::Module&)
(bin/llc+0x18a2aec)
#16 0x00000000018a385f llvm::legacy::PassManagerImpl::run(llvm::Module&)
(bin/llc+0x18a385f)
#17 0x0000000000834947 compileModule(char**, llvm::LLVMContext&)
(bin/llc+0x834947)
#18 0x00000000007d1aec main (bin/llc+0x7d1aec)
#19 0x00007ff721078f45 __libc_start_main
/build/eglibc-MjiXCM/eglibc-2.19/csu/libc-start.c:321:0
#20 0x00000000008296aa _start (bin/llc+0x8296aa)
Stack dump:
0.      Program arguments: bin/llc i128-load.ll 
1.      Running pass 'Function Pass Manager' on module 'i128-load.ll'.
2.      Running pass 'Machine Instruction Scheduler' on function '@foo'
Aborted (core dumped)

-- 
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/20170617/f5d6c72a/attachment-0001.html>


More information about the llvm-bugs mailing list