[LLVMbugs] [Bug 3403] New: llc: "Do not know how to split the result of this operator! "

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sun Jan 25 10:48:00 PST 2009


http://llvm.org/bugs/show_bug.cgi?id=3403

           Summary: llc: "Do not know how to split the result of this
                    operator!"
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: edwintorok at gmail.com
                CC: llvmbugs at cs.uiuc.edu


Due to my recent change for #3402, it is now possible to  use -mattr=-sse on
x86-64.
However in some cases this causes assertion failures in codegen (all ok with
defaults, and -m32):

Testcase: 
$ llc -march=x86-64 x.bc -f -mattr=-sse
target datalayout =
"e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
target triple = "x86_64-unknown-linux-gnu"

define void @acpi_os_printf(i8* %fmt, ...) nounwind optsize {
entry:
        ret void
}
llc:
/home/edwin/llvm-bootstrap/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:358:
void llvm::DAGTypeLegalizer::SplitVectorResult(llvm::SDNode*, unsigned int):
Assertion `0 && "Do not know how to split the result of this operator!"'
failed.
0   llc       0x0000000000c6e99f
1   libc.so.6 0x00007fac0e79df60
2   libc.so.6 0x00007fac0e79ded5 gsignal + 53
3   libc.so.6 0x00007fac0e79f3f3 abort + 387
4   libc.so.6 0x00007fac0e796dc9 __assert_fail + 233
5   llc       0x00000000009e50aa
6   llc       0x00000000009d6c2d
7   llc       0x00000000009d76cf llvm::SelectionDAG::LegalizeTypes() + 847
8   llc       0x0000000000973528 llvm::SelectionDAGISel::CodeGenAndEmitDAG() +
568
9   llc       0x0000000000975612
llvm::SelectionDAGISel::SelectBasicBlock(llvm::BasicBlock*,
llvm::ilist_iterator<llvm::Instruction>,
llvm::ilist_iterator<llvm::Instruction>) + 562
10  llc       0x0000000000975a0c
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function&,
llvm::MachineFunction&, llvm::MachineModuleInfo*, llvm::DwarfWriter*,
llvm::TargetInstrInfo const&) + 748
11  llc       0x0000000000976f9e
llvm::SelectionDAGISel::runOnFunction(llvm::Function&) + 1214
12  llc       0x0000000000c0a2fb
llvm::FPPassManager::runOnFunction(llvm::Function&) + 347
13  llc       0x0000000000c0a6f6
llvm::FunctionPassManagerImpl::run(llvm::Function&) + 134
14  llc       0x0000000000c0a87e
llvm::FunctionPassManager::run(llvm::Function&) + 62
15  llc       0x00000000004fbc31 main + 4193
16  libc.so.6 0x00007fac0e78a1a6 __libc_start_main + 230
17  llc       0x00000000004fa129 std::ios_base::Init::~Init() + 57
Aborted

Without -mattr=-sse, llc generates this:
acpi_os_printf:
        subq    $184, %rsp
        movaps  %xmm7, 160(%rsp)
        movaps  %xmm6, 144(%rsp)
        movaps  %xmm5, 128(%rsp)
        movaps  %xmm4, 112(%rsp)
        movaps  %xmm3, 96(%rsp)
        movaps  %xmm2, 80(%rsp)
        movaps  %xmm1, 64(%rsp)
        movaps  %xmm0, 48(%rsp)
        movq    %r9, 40(%rsp)
        movq    %r8, 32(%rsp)
        movq    %rcx, 24(%rsp)
        movq    %rdx, 16(%rsp)
        movq    %rsi, 8(%rsp)
        addq    $184, %rsp
        ret

gcc generates this:
$ gcc  x.c -S -o - -m64 -mno-sse
acpi_os_printf:
.LFB2:
        pushq   %rbp
.LCFI0:
        movq    %rsp, %rbp
.LCFI1:
        subq    $72, %rsp
.LCFI2:
        movq    %rsi, -168(%rbp)
        movq    %rdx, -160(%rbp)
        movq    %rcx, -152(%rbp)
        movq    %r8, -144(%rbp)
        movq    %r9, -136(%rbp)
        movq    %rdi, -184(%rbp)
        leave
        ret

Or with -O1:
acpi_os_printf:
.LFB2:
        rep
        ret

To reproduce with llvm-gcc:
/* testcase */
void acpi_os_printf(unsigned char* fmt, ...) {
}

$ llvm-gcc  x.c -S -o - -m64 -mno-sse
        .ident  "GCC: (GNU) 4.2.1 (Based on Apple Inc. build 5636) (LLVM
build)"
SplitVectorResult #0: 0x2772730: v4f32 = Register  #1038
cc1:
/home/edwin/llvm-bootstrap/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:358:
void llvm::DAGTypeLegalizer::SplitVectorResult(llvm::SDNode*, unsigned int):
Assertion `0 && "Do not know how to split the result of this operator!"'
failed.
x.c:2: internal compiler error: Aborted
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://developer.apple.com/bugreporter> for instructions.


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list