Skip to content

SimplfyLibCalls should inline calls to abs #2709

@efriedma-quic

Description

@efriedma-quic
Bugzilla Link 2337
Resolution FIXED
Resolved on Jun 09, 2008 03:28
Version unspecified
OS Linux
CC @asl

Extended Description

Per description, SimplfyLibCalls should simplify calls to abs. This isn't necessary for llvm-gcc, but it is useful for compilers that aren't clever enough to fold calls to abs, like clang.

Simple testcase (in clang):
int a(int x) {return abs(x);}

This does bring up an interesting side-issue: can LLVM simplify calls to llabs? llabs, as far as I can tell, only became a reserved external identifier in C99.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzilla

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions