This is an archive of the discontinued LLVM Phabricator instance.

[HLSL] Add acos library function
Needs ReviewPublic

Authored by bob80905 on Aug 24 2022, 12:15 PM.

Details

Reviewers
beanz
pow2clk
Summary

This change exposes the acos library function for HLSL scalar types,excluding long long doubles. Acos is supported for all scalar, vector,and matrix types. This patch only adds a subset of scalar type support.

Long long double support is missing in this patch because that type
doesn't exist in HLSL.

The full documentation of the HLSL acos function is available here:
https://docs.microsoft.com/en-us/windows/win32/direct3dhlsl/dx-graphics-hlsl-acos

Diff Detail

Event Timeline

bob80905 created this revision.Aug 24 2022, 12:15 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 24 2022, 12:15 PM
Herald added a subscriber: Anastasia. · View Herald Transcript
bob80905 requested review of this revision.Aug 24 2022, 12:15 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 24 2022, 12:15 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
bob80905 retitled this revision from [HLSL] Add acos library function This change exposes the acos library function for HLSL scalar types, excluding long long doubles. Acos is supported for all scalar, vector, and matrix types. This patch only adds a subset of scalar type support. to [HLSL] Add acos library function.Aug 24 2022, 12:16 PM
bob80905 edited the summary of this revision. (Show Details)
bob80905 updated this revision to Diff 455343.Aug 24 2022, 1:21 PM

remove scalar types lld and ld from test since hlsl won't support them

@bob80905, if you rebase this you should be able to add half support too now. Otherwise this looks good.