Skip to content

CBE doesn't handle signlessness right #1458

@lattner

Description

@lattner
Bugzilla Link 1086
Resolution FIXED
Resolved on Feb 22, 2010 12:47
Version trunk
OS All

Extended Description

Consider:

int test(unsigned short X, short Y) { return X+Y; }

$ llvm-gcc t.c -c -emit-llvm -o - -O3 | llc -march=c
signed int test(signed short ltmp_0_1, signed short ltmp_1_1) {
return ((((signed int )(signed short )ltmp_1_1)) + (((unsigned int )(unsigned short )ltmp_0_1)));
}

The first argument should be unsigned. This is a serious bug, because it means that bugpoint will get
confused more often than it currently does.

-Chris

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions