[llvm] [NVPTX] Constant fold NVVM fmin and fmax (PR #121966)
Artem Belevich via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 7 14:43:18 PST 2025
================
@@ -38,9 +38,8 @@ enum class TMAReductionOp : uint8_t {
XOR = 7,
};
-inline bool IntrinsicShouldFTZ(Intrinsic::ID IntrinsicID) {
+inline bool FloatToIntIntrinsicShouldFTZ(Intrinsic::ID IntrinsicID) {
----------------
Artem-B wrote:
Nit. The new name implies that the function is intended for f2i intrinsics only, yet it will still happily accept other intrinsics.
If it is intended to be restricted to particular subset of intrinsics (as opposed to telling us whether a given intrinsic folds to zero), then it should handle all entries in the set, and have an assertion in case an unexpected intrinsic is passed.
I'd just revert to the old name, and, possibly, extend the list of intrinsics, if we're missing any other FTZ variants.
https://github.com/llvm/llvm-project/pull/121966
More information about the llvm-commits
mailing list