[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


           Summary: %sil generated on linux/x86 even when -march=x86 is
           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 =
target triple = "i386-pc-linux-gnu"

define hidden i32 @__addvsi3(i32 %a, i32 %b) nounwind {
        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>
        br i1 %iftmp.23.0.in, label %bb4, label %bb5

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

bb5:            ; preds = %entry
        ret i32 %0

declare void @abort() noreturn nounwind

This generates the following assembly:

        .align  16
        .globl  __addvsi3
        .hidden __addvsi3
        .type   __addvsi3, at function
        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
.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