[llvm-bugs] [Bug 45887] New: llvm-mc: ICE in llvm::AMDGPUInstPrinter::printU32ImmOperand for mattr=-code-object-v3 -mcpu=fiji

via llvm-bugs llvm-bugs at lists.llvm.org
Tue May 12 07:06:56 PDT 2020


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

            Bug ID: 45887
           Summary: llvm-mc: ICE in
                    llvm::AMDGPUInstPrinter::printU32ImmOperand for
                    mattr=-code-object-v3 -mcpu=fiji
           Product: libraries
           Version: 10.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: AMDGPU
          Assignee: unassignedbugs at nondot.org
          Reporter: burnus at net-b.de
                CC: llvm-bugs at lists.llvm.org

Created attachment 23472
  --> https://bugs.llvm.org/attachment.cgi?id=23472&action=edit
cc7kNLGI.mkoffload.2.s – assemble with: llvm-mc  -mattr=-code-object-v3
-mcpu=fiji

Running the following command

/usr/bin/llvm-mc-10.0.0 -triple=amdgcn--amdhsa -mattr=-code-object-v3
-mcpu=fiji -filetype=obj -o /tmp/ccjCfcds.o cc7kNLGI.mkoffload.2.s

Gives a segfault (see below). At least it fails with OpenSUSE's LLVM 10 and
LLVM 9 and also with Debian's LLVM 9/10. The assembler file has been generated
with GCC 10, but in any case an ICE is wrong.
[Cf. also https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94278]


llvm::raw_ostream::operator<< (this=0x1, Fmt=...) at
../lib/Support/raw_ostream.cpp:309
309       size_t BufferBytesLeft = OutBufEnd - OutBufCur;

#1  0x00007ffff56d2388 in llvm::AMDGPUInstPrinter::printU32ImmOperand
(this=0x48a201, MI=0x48af18, OpNo=2, STI=..., O=...) at
../lib/Target/AMDGPU/MCTargetDesc/AMDGPUInstPrinter.cpp:78
78        O << formatHex(MI->getOperand(OpNo).getImm() & 0xffffffff);
(gdb) bt
#0  llvm::raw_ostream::operator<< (this=0x1, Fmt=...) at
../lib/Support/raw_ostream.cpp:309
#1  0x00007ffff56d2388 in llvm::AMDGPUInstPrinter::printU32ImmOperand
(this=0x48a201, MI=0x48af18, OpNo=2, STI=..., O=...) at
../lib/Target/AMDGPU/MCTargetDesc/AMDGPUInstPrinter.cpp:78
#2  llvm::AMDGPUInstPrinter::printInstruction (this=0x48a201, MI=<optimized
out>, Address=<optimized out>, STI=warning: RTTI symbol not found for class
'(anonymous namespace)::ELFSingleObjectWriter [clone
.llvm.9618930050404732398]'
..., O=...) at lib/Target/AMDGPU/AMDGPUGenAsmWriter.inc:33103

-- 
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/20200512/0c6a5a0c/attachment-0001.html>


More information about the llvm-bugs mailing list