Skip to content

X86: when SSE1 isn't available, f32 arguments are incorrectly passes as f64 #1861

@llvmbot

Description

@llvmbot
Bugzilla Link 1489
Resolution FIXED
Resolved on Feb 22, 2010 12:41
Version 1.0
OS Linux
Reporter LLVM Bugzilla Contributor

Extended Description

llvm-gcc is miscompiling the following c code:


#define _ISOC9X_SOURCE 1
#include <math.h>
int main( void ) { return (lrintf(3.999f) > 0)?0:1; }


laurov@laurov-laptop:/tmp$ gcc test.c -o test -lm
laurov@laurov-laptop:/tmp$ ./test
laurov@laurov-laptop:/tmp$ echo $?
0
laurov@laurov-laptop:/tmp$ llvm-gcc test.c -o test -lm
laurov@laurov-laptop:/tmp$ ./test
laurov@laurov-laptop:/tmp$ echo $?
1

To reproduce this bug with llc must be used "llc -disable-fp-elim -fast -mcpu=i486".

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions