[llvm-bugs] [Bug 50258] New: MCA does not support IsOptimizableRegisterMove for XCHG32rr

via llvm-bugs llvm-bugs at lists.llvm.org
Fri May 7 03:36:20 PDT 2021


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

            Bug ID: 50258
           Summary: MCA does not support IsOptimizableRegisterMove for
                    XCHG32rr
           Product: tools
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: llvm-mca
          Assignee: unassignedbugs at nondot.org
          Reporter: lebedev.ri at gmail.com
                CC: andrea.dibiagio at gmail.com, llvm-bugs at lists.llvm.org,
                    matthew.davis at sony.com

Add XCHG32rr into IsOptimizableRegisterMove for btver2,
run mca on 

xchgl %eax, %ecx
xchgl %ecx, %edx

and get


llvm-mca: /repositories/llvm-project/llvm/lib/MCA/Stages/DispatchStage.cpp:99:
llvm::Error llvm::mca::DispatchStage::dispatch(llvm::mca::InstRef): Assertion
`IS.getDefs().size() == 1 && "Expected a single input!"' failed.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace.
Stack dump:
0.      Program arguments: ./bin/llvm-mca -mtriple=x86_64-unknown-unknown
-mcpu=znver3 -iterations=1 -timeline -register-file-stats
 #0 0x00007f352ede0a63 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int)
/repositories/llvm-project/llvm/lib/Support/Unix/Signals.inc:565:13
 #1 0x00007f352edde630 llvm::sys::RunSignalHandlers()
/repositories/llvm-project/llvm/lib/Support/Signals.cpp:77:18
 #2 0x00007f352ede0f6f SignalHandler(int)
/repositories/llvm-project/llvm/lib/Support/Unix/Signals.inc:407:1
 #3 0x00007f352fbf8140 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x14140)
 #4 0x00007f352e6f9ce1 raise ./signal/../sysdeps/unix/sysv/linux/raise.c:51:1
 #5 0x00007f352e6e3537 abort ./stdlib/abort.c:81:7
 #6 0x00007f352e6e340f get_sysdep_segment_value ./intl/loadmsgcat.c:509:8
 #7 0x00007f352e6e340f _nl_load_domain ./intl/loadmsgcat.c:970:34
 #8 0x00007f352e6f2662 (/lib/x86_64-linux-gnu/libc.so.6+0x34662)
 #9 0x00007f352fc68d98 llvm::mca::DispatchStage::dispatch(llvm::mca::InstRef)
/repositories/llvm-project/llvm/lib/MCA/Stages/DispatchStage.cpp:100:5
#10 0x00007f352fc690fc llvm::mca::DispatchStage::execute(llvm::mca::InstRef&)
/repositories/llvm-project/llvm/lib/MCA/Stages/DispatchStage.cpp:181:3
#11 0x00007f352fc69430 llvm::Error::getPtr() const
/repositories/llvm-project/llvm/include/llvm/Support/Error.h:274:42
#12 0x00007f352fc69430 llvm::Error::operator bool()
/repositories/llvm-project/llvm/include/llvm/Support/Error.h:236:16
#13 0x00007f352fc69430 llvm::mca::EntryStage::execute(llvm::mca::InstRef&)
/repositories/llvm-project/llvm/lib/MCA/Stages/EntryStage.cpp:44:19
#14 0x00007f352fc67ff1 llvm::Error::getChecked() const
/repositories/llvm-project/llvm/include/llvm/Support/Error.h:294:41
#15 0x00007f352fc67ff1 llvm::Error::assertIsChecked()
/repositories/llvm-project/llvm/include/llvm/Support/Error.h:266:9
#16 0x00007f352fc67ff1 llvm::Error::operator=(llvm::Error&&)
/repositories/llvm-project/llvm/include/llvm/Support/Error.h:212:5
#17 0x00007f352fc67ff1 llvm::mca::Pipeline::runCycle()
/repositories/llvm-project/llvm/lib/MCA/Pipeline.cpp:63:9
#18 0x00007f352fc67d43 llvm::Error::getPtr() const
/repositories/llvm-project/llvm/include/llvm/Support/Error.h:274:42
#19 0x00007f352fc67d43 llvm::Error::operator bool()
/repositories/llvm-project/llvm/include/llvm/Support/Error.h:236:16
#20 0x00007f352fc67d43 llvm::mca::Pipeline::run()
/repositories/llvm-project/llvm/lib/MCA/Pipeline.cpp:42:15
#21 0x0000000000220d02 llvm::Expected<unsigned int>::operator bool()
/repositories/llvm-project/llvm/include/llvm/Support/Error.h:531:17
#22 0x0000000000220d02 runPipeline(llvm::mca::Pipeline&)
/repositories/llvm-project/llvm/tools/llvm-mca/llvm-mca.cpp:292:8
#23 0x000000000021ef7b main
/repositories/llvm-project/llvm/tools/llvm-mca/llvm-mca.cpp:0:10
#24 0x00007f352e6e4d0a __libc_start_main ./csu/../csu/libc-start.c:308:16
#25 0x000000000021886a _start (./bin/llvm-mca+0x21886a)

-- 
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/20210507/ab201cf1/attachment.html>


More information about the llvm-bugs mailing list