[LLVMbugs] [Bug 2710] New: %sil generated on linux/x86 even when -march= x86 is specified

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Fri Aug 22 15:58:25 PDT 2008


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

           Summary: %sil generated on linux/x86 even when -march=x86 is
                    specified
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Backend: X86
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: alenhar2 at uiuc.edu
                CC: llvmbugs at cs.uiuc.edu


%sil is generated on x86-32 for the following code:

; ModuleID = '<stdin>'
target datalayout =
"e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32"
target triple = "i386-pc-linux-gnu"

define hidden i32 @__addvsi3(i32 %a, i32 %b) nounwind {
entry:
        add i32 %b, %a          ; <i32>:0 [#uses=3]
        icmp sgt i32 %b, -1             ; <i1>:1 [#uses=1]
        icmp sgt i32 %0, %a             ; <i1>:2 [#uses=1]
        icmp slt i32 %0, %a             ; <i1>:3 [#uses=1]
        %iftmp.23.0.in = select i1 %1, i1 %3, i1 %2             ; <i1>
[#uses=1]
        br i1 %iftmp.23.0.in, label %bb4, label %bb5

bb4:            ; preds = %entry
        tail call void @abort( ) noreturn nounwind
        unreachable

bb5:            ; preds = %entry
        ret i32 %0
}

declare void @abort() noreturn nounwind


This generates the following assembly:



        .text
        .align  16
        .globl  __addvsi3
        .hidden __addvsi3
        .type   __addvsi3, at function
__addvsi3:
        pushl   %esi
        movl    8(%esp), %ecx
        movl    12(%esp), %edx
        leal    (%edx,%ecx), %eax
        cmpl    %ecx, %eax
        setl    %cl
        setg    %sil
        testl   %edx, %edx
        cmovns  %cx, %si
        movw    %si, %cx
        notb    %cl
        testb   $1, %cl
        je      .LBB1_2 # bb4
.LBB1_1:        # bb5
        popl    %esi
        ret
.LBB1_2:        # bb4
        call    abort
        .size   __addvsi3, .-__addvsi3

        .section        .note.GNU-stack,"", at progbits


which contains references to sil which gas is not particularly happy with for
32 bit code.


-- 
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