This is an archive of the discontinued LLVM Phabricator instance.

[Clang] Support constexpr builtin fmin
ClosedPublic

Authored by Izaron on Oct 7 2022, 2:47 PM.

Details

Summary

Support constexpr version of __builtin_fmin and its variations.

Diff Detail

Event Timeline

Izaron created this revision.Oct 7 2022, 2:47 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 7 2022, 2:47 PM
Izaron requested review of this revision.Oct 7 2022, 2:47 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 7 2022, 2:47 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
Izaron added a comment.EditedOct 7 2022, 2:48 PM

This is a mirror of my previous patch about builtin max. I promised to make the patch for builtin min =) Here: https://reviews.llvm.org/D134369#3806131

It conforms to libc fmin implementation: https://github.com/llvm/llvm-project/blob/1ae405144d62299d87096de4dc2596a04a4fee84/libc/src/__support/FPUtil/BasicOperations.h#L26-L42

Izaron updated this revision to Diff 466193.Oct 7 2022, 2:50 PM

Aligned slashes in defines

jcranmer-intel accepted this revision.Oct 10 2022, 8:07 AM
This revision is now accepted and ready to land.Oct 10 2022, 8:07 AM
This revision was automatically updated to reflect the committed changes.