[LLVMbugs] [Bug 7473] New: [MIPS] llc with mips target is incorrect for the Select Instruction

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Jun 23 13:43:45 PDT 2010


           Summary: [MIPS] llc with mips target is incorrect for the
                    Select Instruction
           Product: tools
           Version: 2.7
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: llc
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: stetorvs at gmail.com
                CC: llvmbugs at cs.uiuc.edu

Created an attachment (id=5094)
 --> (http://llvm.org/bugs/attachment.cgi?id=5094)
Simple test case to illustrate issue.

Since the MIPS backend cannot yet produce elf files, my current flow is as
1) LLVM-GCC compiles C->bitcode
2) LLC compiles bitcode->mips assembly
3) A cross-compiled GCC AS assembles the mips assembly into object file
4) A cross-compiled GCC LD links object files into ELF file

When run, the select instruction is incorrectly evaluated. It should print 0,
instead it prints 3.

My system:
Linux x86_32 GNU/Linux

This is with LLVM 2.7, and llvm-gcc (GCC) 4.2.1 build 5658.
The cross-compiler used is:
GNU assembler (GNU Binutils) 2.20.51

The following commands are used to compile:
llvm-gcc select.c -O3 -emit-llvm -c -o select.bc
llc select.bc -march=mipsel -relocation-model=static -mips-ssection-threshold=0
-mcpu=mips1 -o select.s
mipsel-unknown-elf-as select.s -g -mips1 -mabi=eabi -o select.o
mipsel-unknown-elf-ld -Ttext 0x80030000 -e main select.o -o select.elf

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