This is an archive of the discontinued LLVM Phabricator instance.

Add builtin_elementwise_log
ClosedPublic

Authored by bob80905 on Dec 21 2022, 11:20 AM.

Details

Summary

Add codegen for llvm log elementwise builtin
The log elementwise builtin is necessary for HLSL codegen.
Tests were added to make sure that the expected errors are encountered when these functions are given inputs of incompatible types.
The new builtin is restricted to floating point types only.

Diff Detail

Event Timeline

bob80905 created this revision.Dec 21 2022, 11:20 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 21 2022, 11:20 AM
Herald added a subscriber: Anastasia. · View Herald Transcript
bob80905 requested review of this revision.Dec 21 2022, 11:20 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 21 2022, 11:20 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
bob80905 updated this revision to Diff 484633.Dec 21 2022, 11:23 AM

add both commits

python3kgae added inline comments.Jan 11 2023, 10:49 AM
clang/docs/LanguageExtensions.rst
638

Shall we add log2 and log10 together?

clang/test/Sema/riscv-sve-vector-log-ops.c
12

log here?

bob80905 updated this revision to Diff 488339.Jan 11 2023, 12:27 PM
  • replace sin fxn with log

Ping, can someone please take a look?

NoQ added inline comments.Jan 26 2023, 2:50 PM
clang/lib/Analysis/UnsafeBufferUsage.cpp
248 ↗(On Diff #488339)

Looks like you accidentally included my unrelated commit, which caused Phabricator to summon me.

bob80905 updated this revision to Diff 492581.Jan 26 2023, 3:06 PM

remove unrelated commit

beanz accepted this revision.Jan 31 2023, 12:39 PM

LGTM. This looks pretty straightforward and similar to other changes you've been making.

This revision is now accepted and ready to land.Jan 31 2023, 12:39 PM
This revision was automatically updated to reflect the committed changes.