[PATCH] D106651: [RISCV] Add support for vector saturating add/sub operations
Fraser Cormack via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 27 02:05:42 PDT 2021
frasercrmck added a comment.
Thanks for the input. I suspect that any solution that involves builtins/intrinsics to read flags without explicit use/def chains is inherently "lossy" and the programmer can't guarantee that the compiler won't re-order or remove instructions. I'd imagine that we'd recommend that the programmer performs the saturation checks themselves in C.
If there were builtins like `__builtin_add_overflow` but for saturation and we wanted to use the saturation instructions then I think we'd have to clear the CSR before the operation.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106651/new/
https://reviews.llvm.org/D106651
More information about the llvm-commits
mailing list