[PATCH] D117898: [Clang] Add elementwise saturated add/sub builtins
Simon Pilgrim via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 21 08:51:47 PST 2022
RKSimon created this revision.
RKSimon added reviewers: fhahn, aaron.ballman, scanon, craig.topper.
Herald added subscribers: pengfei, sunfish, kristof.beyls, dschuff.
RKSimon requested review of this revision.
Herald added a subscriber: aheejin.
Herald added a project: clang.
This patch implements `__builtin_elementwise_add_sat` and `__builtin_elementwise_sub_sat' builtins
These map to the add/sub saturated math intrinsics described here:
With this in place we should then be able to replace the x86 SSE adds/subs intrinsics with these generic variants - it looks like other targets should be able to use these as well (arm/aarch64/webassembly all have similar examples in cgbuiltin).
rG LLVM Github Monorepo
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 15475 bytes
Desc: not available
More information about the cfe-commits