This is an archive of the discontinued LLVM Phabricator instance.

[libc] Support the `abs` functions in the GPU libc.
ClosedPublic

Authored by jhuber6 on Apr 26 2023, 6:49 PM.

Details

Summary

This patch simply enables building the integer abs functions for the
GPU.

Diff Detail

Event Timeline

jhuber6 created this revision.Apr 26 2023, 6:49 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptApr 26 2023, 6:49 PM
jhuber6 requested review of this revision.Apr 26 2023, 6:49 PM

This is the first set of functions that may shadow some of the definitions that the GPU header wrappers provide.

sivachandra added inline comments.Apr 26 2023, 10:44 PM
libc/config/gpu/api.td
13 ↗(On Diff #517425)

Why are these types required?

jhuber6 added inline comments.Apr 27 2023, 4:33 AM
libc/config/gpu/api.td
13 ↗(On Diff #517425)

It didn't build, and the div_t stuff is simply a struct of integers. I could make this patch provide div as well since it's relatively simple.

jhuber6 updated this revision to Diff 517568.Apr 27 2023, 8:18 AM

Remove ldiv types

sivachandra accepted this revision.Apr 27 2023, 8:55 AM
This revision is now accepted and ready to land.Apr 27 2023, 8:55 AM
This revision was landed with ongoing or failed builds.Apr 27 2023, 6:32 PM
This revision was automatically updated to reflect the committed changes.