This is an archive of the discontinued LLVM Phabricator instance.

[CodeGen] Emit conj/conjf/confjl libcalls as fneg instructions if possible.
ClosedPublic

Authored by craig.topper on Dec 30 2019, 11:14 PM.

Details

Summary

We already recognize the __builtin versions of these, might as well
recognize the libcall version.

Diff Detail

Event Timeline

craig.topper created this revision.Dec 30 2019, 11:14 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 30 2019, 11:14 PM
spatel accepted this revision.Dec 31 2019, 6:06 AM

Code change LGTM - see inline for a question about the testing.

clang/test/CodeGen/complex-libcalls.c
115–119

Could we use positive matches for "fneg" here rather than NOT lines? If so, then do we need the new test file?

This revision is now accepted and ready to land.Dec 31 2019, 6:06 AM
craig.topper marked an inline comment as done.Dec 31 2019, 9:31 AM
craig.topper added inline comments.
clang/test/CodeGen/complex-libcalls.c
115–119

All of the CHECK lines are in the declaration part of the file after the function body. They aren’t checking the call site code. I could add new functions for the conj calls and check them earlier?

This revision was automatically updated to reflect the committed changes.