[flang-commits] [PATCH] D129296: Lower mask intrinsics
Tarun Prabhu via Phabricator via flang-commits
flang-commits at lists.llvm.org
Mon Jul 11 09:46:57 PDT 2022
tarunprabhu added a comment.
What do you suggest I do with this patch and the other concerning SHIFT intrinsics <https://reviews.llvm.org/D129316>?
All have very straightforward implementations using one of LLVM's `shl`, `lshr` and `ashr` instructions, especially if bounds checks are not carried out. According to the documentation <https://llvm.org/docs/LangRef.html#lshr-instruction>, those instructions will produce poison values if called with out-of-bounds operands. Some very basic testing seems to produce some non-determinstic result on my machine (Linux, x86-64) in the case of dynamic poison values.
I do not have access to multiple Fortran compilers to test this, so I cannot attempt to match the behavior of other compilers.
NOTES:
1. Values for the operands for these intrinsics considered out-of-bounds by the Fortran standard would also be considered out-of-bounds by LLVM.
2. Out-of-bounds values that are statically known result in a compile-time error in Flang (and also gfortran).
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129296/new/
https://reviews.llvm.org/D129296
More information about the flang-commits
mailing list